OFFSET
1,1
COMMENTS
Leading zeros not allowed, trailing zeros are.
This means that, e.g., 95 is not in the sequence although 95^2 = 9025 could be seen as concatenation of 9 and 025 = 5^2. - M. F. Hasler, Jan 25 2016
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..3000
FORMULA
a(n) = sqrt(A039686(n)). - M. F. Hasler, Jan 25 2016
EXAMPLE
1771^2 = 3136441 = 3136_441 and 3136 = 56^2, 441 = 21^2.
MATHEMATICA
squareQ[n_] := IntegerQ[Sqrt[n]]; okQ[n_] := MatchQ[IntegerDigits[n^2], {a__ /; squareQ[FromDigits[{a}]], b__ /; First[{b}] > 0 && squareQ[FromDigits[{b}]]}]; Select[Range[3000], okQ] (* Jean-François Alcover, Oct 20 2011, updated Dec 13 2016 *)
PROG
(PARI) is_A048375(n)={my(p=100^valuation(n, 10)); n*=n; while(n>p*=10, issquare(n%p)&&issquare(n\p)&&n%p*10>=p&&return(1))} \\ M. F. Hasler, Jan 25 2016
(Python)
from math import isqrt
def issquare(n): return isqrt(n)**2 == n
def ok(n):
d = str(n)
for i in range(1, len(d)):
if d[i] != '0' and issquare(int(d[:i])) and issquare(int(d[i:])):
return True
return False
print([r for r in range(2851) if ok(r*r)]) # Michael S. Branicky, Jul 13 2021
CROSSREFS
KEYWORD
nonn,easy,nice,base
AUTHOR
Patrick De Geest, Mar 15 1999
STATUS
approved