OFFSET
1,1
COMMENTS
Let x(0)x(1)... x(q-1)x(q) denote the decimal expansion of a number n. The sequence lists the numbers n such that the prefix x(0)x(1)... x(q-1) and the suffix x(1)... x(q-1)x(q) are both a perfect square.
The primes of the sequence are 11, 19, 41, 1009, 4001, 7841, 9001, 40961,...
EXAMPLE
816 is in the sequence because 81 and 16 are squares.
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:
PROG
(PARI) isok(n) = (left = n\10) && issquare(left) && (pt = 10^(#Str(n)-1)) && issquare(n - (n\pt)*pt); \\ Michel Marcus, Jun 25 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Jun 25 2014
STATUS
approved