[go: up one dir, main page]

login
A171976
Numbers n such that the sum of the squares of the digits of n^n is a square.
0
0, 1, 2, 8, 10, 100, 123, 209, 312, 1000, 1668, 2191, 2268, 4767, 9338, 10000, 11004, 12248, 12322, 15926, 17951, 18202, 19764, 21807, 29509, 42647, 43072, 44750, 54237, 56634, 70383, 74032, 85325, 90906, 95261, 100000
OFFSET
1,3
FORMULA
{n: A003132(n^n) in A000290}.
{n: n^n in A175396.}
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
Sequence in context: A230826 A071184 A174153 * A362278 A081231 A229128
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