Friedman number

A Friedman number is an integer, which represented in a given numeral system, is the result of a non-trivial expression using all its own digits in combination with any of the four basic arithmetic operators (+, −, ×, ÷), additive inverses, parentheses, exponentiation, and concatenation. Here, non-trivial means that at least one operation besides concatenation is used. Leading zeros cannot be used, since that would also result in trivial Friedman numbers, such as 024 = 20 + 4. For example, 347 is a Friedman number in the decimal numeral system, since 347 = 73 + 4. The decimal Friedman numbers are:

25, 121, 125, 126, 127, 128, 153, 216, 289, 343, 347, 625, 688, 736, 1022, 1024, 1206, 1255, 1260, 1285, 1296, 1395, 1435, 1503, 1530, 1792, 1827, 2048, 2187, 2349, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2592, 2737, 2916, ... (sequence A036057 in the OEIS).

Friedman numbers are named after Erich Friedman, a now-retired mathematics professor at Stetson University and recreational mathematics enthusiast.

A Friedman prime is a Friedman number that is also prime. The decimal Friedman primes are:

127, 347, 2503, 12101, 12107, 12109, 15629, 15641, 15661, 15667, 15679, 16381, 16447, 16759, 16879, 19739, 21943, 27653, 28547, 28559, 29527, 29531, 32771, 32783, 35933, 36457, 39313, 39343, 43691, 45361, 46619, 46633, 46643, 46649, 46663, 46691, 48751, 48757, 49277, 58921, 59051, 59053, 59263, 59273, 64513, 74353, 74897, 78163, 83357, ... (sequence A112419 in the OEIS).