OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..250
EXAMPLE
841 is in the sequence because :
8 + 4^2 + 1^3 = 25 = 5^2 ;
8^3 + 4^2 + 1 = 529 = 23^2.
MAPLE
with(numtheory):for n from 1 to 50000 do:l:=length(n):n0:=n:s1:=0:s2:=0:for
m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s1:=s1+u^(l-m+1):s2:=s2+u^m:od:s10:= sqrt(s1):s20:=sqrt(s2): if s10=floor(s10) and s20=floor(s20) then printf(`%d, `, n):else fi:od:
MATHEMATICA
ndnQ[n_]:=Module[{idn=IntegerDigits[n], len=Range[IntegerLength[n]]}, AllTrue[{Sqrt[Total[idn^len]], Sqrt[Total[Reverse[idn]^len]]}, IntegerQ]]; Select[Range[31000], ndnQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 10 2018 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Dec 21 2010
STATUS
approved