OFFSET
1,2
COMMENTS
Since 0^0 is indeterminate, but for all other Xs, X^0 is 1, we define 0^0 here to be 1. (Since 0 does not divide 1, 0 is not a member.)
For Münchhausen numbers (A046253) the ratio is 1. [Paolo P. Lava, Apr 08 2016]
EXAMPLE
63 is in the sequence because 6^6+3^3 = 46683 and 46683/63 = 741, an integer.
MAPLE
with(numtheory): P:=proc(q) local a, b, k, n; for n from 1 to q do a:=[]; b:=n; while b>0 do a:=[op(a), b mod 10]; b:=trunc(b/10); od; b:=0; for k from 1 to nops(a) do if a[k]=0 then b:=b+1; else b:=b+a[k]^a[k]; fi; od; if type(b/n, integer) then print(n); fi; od; end: P(10^10);
MATHEMATICA
fQ[n_] := Block[{id = IntegerDigits@ n /. {0 -> 1}}, Mod[ Total[ id^id], n] == 0]; k = 1; lst = {}; While[k < 10000000001, If[ fQ@ k, AppendTo[ lst, k]; Print@ k]; k++]; lst
CROSSREFS
KEYWORD
nonn,base,fini
AUTHOR
Paolo P. Lava and Robert G. Wilson v, Jun 05 2014
STATUS
approved