OFFSET
1,3
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
Michael S. Branicky, Python program
Wikipedia, Substring
MATHEMATICA
fQ[n_] := Module[{d = IntegerDigits[n], len, ds, sq}, len = Length[d]; ds = FromDigits /@ Flatten[Table[Partition[d, i, 1], {i, len - 1}], 1]; sq = Select[ds, IntegerQ[Sqrt[#]] &]; sq == {}]; Select[Range[0, 10000]^2, fQ]
PROG
(Python) # see link for faster version for producing b-file
from math import isqrt
from itertools import count, islice
def issquare(n): return isqrt(n)**2 == n
def cond(s):
if len(s) == 1: return True
if any(d in s for d in "0149"): return False
ss = (s[i:i+l] for i in range(len(s)) for l in range(2, len(s)))
return not any(issquare(int(u)) for u in ss)
def agen(): yield from (k**2 for k in count(0) if cond(str(k**2)))
print(list(islice(agen(), 34))) # Michael S. Branicky, Feb 23 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
T. D. Noe, Mar 05 2014
STATUS
approved