OFFSET
1,2
COMMENTS
Sequence is complete. - Giovanni Resta, Mar 21 2013
EXAMPLE
sumdigit(13)=4; 4^4 = 256; sumdigit(256)=13
MAPLE
P:=proc(n) local i, j, k, w; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; k:=w^w; w:=0; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; if (i=w) then print(i, w); fi; od; end: P(100);
MATHEMATICA
sdQ[n_]:=Module[{sd=Total[IntegerDigits[n]]}, n==Total[ IntegerDigits[ sd^sd]]]; Select[Range[100], sdQ] (* Harvey P. Dale, Oct 22 2013 *)
CROSSREFS
KEYWORD
easy,fini,full,nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Feb 02 2007
STATUS
approved