OFFSET
1,2
EXAMPLE
3265 is in the sequence because 3^1 + 2^2 + 6^3 + 5^4 = 3! + 2! + 6! + 5! = 848.
MATHEMATICA
Select[Range@40000, Total[(a=IntegerDigits@#)^Range@Length@a]==Total[a!]&] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
PROG
(Python)
from math import factorial
def digfac(s): return sum(factorial(int(d)) for d in s)
def digpow(s): return sum(int(d)**i for i, d in enumerate(s, start=1))
def aupto(limit):
alst = []
for k in range(1, limit+1):
s = str(k)
if digpow(s) == digfac(s): alst.append(k)
return alst
print(aupto(32000)) # Michael S. Branicky, Mar 30 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carole Dubois, Mar 30 2021
STATUS
approved