The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238334 Squares that do not contain a shorter substring that is a square. 4
0, 1, 4, 9, 25, 36, 576, 676, 5776, 27556, 33856, 538756, 586756, 665856, 682276, 763876, 767376, 853776, 872356, 2637376, 2775556, 2835856, 5635876, 6885376, 7376656, 22886656, 23755876, 23775376, 26275876, 26687556, 26873856, 32672656, 32878756, 37527876 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
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
Cf. A130448.
Sequence in context: A087058 A046659 A063760 * A130448 A046451 A341790
KEYWORD
nonn,base
AUTHOR
T. D. Noe, Mar 05 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 07:35 EDT 2024. Contains 372530 sequences. (Running on oeis4.)