A378246 Integers that are equal to the product of their nonzero digits raised to their own power.
1, 1024, 12500
Offset: 1
Examples
1024 = 1^1 * 2^2 * 4^4. 12500 = 1^1 * 2^2 * 5^5.
Links
- Jason Hammerman, Python program
- Wikipedia, Zero to the power of zero
Programs
-
Mathematica
F[a_]:=If[a==0,1,a^a];Select[Range[10^5],#==Times@@F/@IntegerDigits[#]&] (* James C. McMahon, Dec 14 2024 *)
-
PARI
isok(k) = my(d=digits(k)); k == vecprod(vector(#d, i, d[i]^d[i])); \\ Michel Marcus, Nov 22 2024
-
Python
# See Python program link.
-
Python
from math import prod def ok(n): return n == prod(d**d for d in map(int, str(n)) if d > 1) print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Nov 24 2024
Comments