%I #15 Apr 08 2016 07:38:40
%S 1,2,3,4,5,6,7,8,9,63,64,93,377,643,699,760,2428,3435,13073,46864,
%T 184405,208858,1313290,2326990,2868720,2868741,18273988,25265859,
%U 33690905,87889176,194123725,589957694
%N Consider a decimal number, n, with k digits. n = d(k)*10^(k-1) + d(k-1)*10^(k-2) + … + d(2)*10 + d_(1). Sequence lists the numbers n that divide s = Sum_{i=1..k} d(i)^d(i).
%C 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.)
%C For Münchhausen numbers (A046253) the ratio is 1. [_Paolo P. Lava_, Apr 08 2016]
%e 63 is in the sequence because 6^6+3^3 = 46683 and 46683/63 = 741, an integer.
%p 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);
%t 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
%Y Cf. A005188, A046253, A243023.
%K nonn,base,fini
%O 1,2
%A _Paolo P. Lava_ and _Robert G. Wilson v_, Jun 05 2014