OFFSET
1,3
EXAMPLE
8 is in the sequence because 8^8 = 16777216 and 1^2+6^2+7^2+7^2+7^2+2^2+1^2+6^2
= 225 = 15^2.
MAPLE
with(numtheory): digits:=200:nn:=5000:for n from 0 to nn do:l:=length(n^n):n0:=n^n:s:=0:for
m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+u^2:od:if sqrt(s)=
floor(sqrt(s))then printf(`%d, `, n):else fi:od:
MATHEMATICA
Join[{0}, Select[Range[100000], IntegerQ[Sqrt[Total[IntegerDigits[ #^#]^2]]]&]] (* Harvey P. Dale, Sep 25 2018 *)
PROG
(PARI) isok(n) = my(d = digits(n^n)); issquare (sum(i=1, #d, d[i]^2)); \\ Michel Marcus, Jan 15 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Nov 19 2010
EXTENSIONS
Edited by D. S. McNeil, Nov 19 2010
Offset corrected and more terms added, Michel Marcus, Jan 15 2014
STATUS
approved