A244283 Consider a number n with m decimal digits, m>9. The sequence lists the numbers n such that the prefix of length m-1 and the suffix of length m-1 are both perfect squares.
10, 11, 14, 19, 40, 41, 44, 49, 90, 91, 94, 99, 164, 364, 649, 816, 1000, 1001, 1004, 1009, 1441, 1961, 2256, 4000, 4001, 4004, 4009, 4841, 6256, 7841, 9000, 9001, 9004, 9009, 20256, 30256, 31369, 40961, 46241, 51849, 54761, 60841, 73969, 79216, 90256, 94096
Offset: 1
Examples
816 is in the sequence because 81 and 16 are squares.
Programs
-
Maple
with(numtheory): for n from 10 to 20000 do: x:=convert(n, base, 10):n1:=nops(x): s1:=sum('x[i]*10^(i-1) ', 'i'=1..n1-1): s2:=(n-irem(n,10))/10:ss1:=sqrt(s1):ss2:=sqrt(s2): if ss1=floor(ss1) and ss2=floor(ss2) then printf(`%d, `, n): else fi: od:
-
PARI
isok(n) = (left = n\10) && issquare(left) && (pt = 10^(#Str(n)-1)) && issquare(n - (n\pt)*pt); \\ Michel Marcus, Jun 25 2014
Comments