OFFSET
1,1
COMMENTS
Subsquares with leading and/or trailing zeros not included. Subsquares are at least 2 digits long.
EXAMPLE
57 is a term because 57^2 = 3249 in which we see 324 = 18^2 and 49 = 7^2 overlapping in a single digit, namely the digit 4.
162225 is a term:
162225^2 = 26316950625
513^2 = 263169
975^2 = 950625
^
|
1-digit overlap
MATHEMATICA
qQ[w_] := w[[1]] > 0 && w[[-1]] > 0 && IntegerQ@ Sqrt@ FromDigits[w]; ok[n_] := n>9 && Mod[n, 10] > 0 && Block[{d = IntegerDigits[ n^2], m}, m = Length[d]; AnyTrue[ Range[2, m-1], qQ[ Take[d, #]] && qQ[Take[d, {#, m}]] &]]; Select[Range[10^5], ok] (* Giovanni Resta, Oct 14 2019 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Apr 15 1999
STATUS
approved