login
Numbers n such that d(1)^p + d(2)^(p-1) +... + d(p)^1 is a square, where d(i), i=1..p, are the digits of n.
0

%I #7 Mar 30 2012 18:35:53

%S 0,1,4,9,10,13,18,20,25,30,37,40,49,50,60,70,80,90,100,103,108,112,

%T 117,124,136,148,201,208,210,217,224,238,241,253,265,277,289,309,318,

%U 325,330,346,361,375,389,400,438,441,460,478,543,568,587,609,618,625,630,664,689,739,742,778,838,841,880,900,976,1000

%N Numbers n such that d(1)^p + d(2)^(p-1) +... + d(p)^1 is a square, where d(i), i=1..p, are the digits of n.

%C Numbers n such that A114570(n) is a perfect square.

%e 253 is in the sequence because 2^3 + 5^2 + 3 = 36 = 6^2.

%p with(numtheory):for n from 0 to 1000 do:l:=length(n):n0:=n:s1:=0:s2:=0:for

%p m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s2:=s2+u^m:od:s20:=sqrt(s2):

%p if s20=floor(s20)then printf(`%d,`,n):else fi:od:

%K nonn,base

%O 0,3

%A _Michel Lagneau_, Dec 20 2010