login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A365820
Numbers with three or more digits such that every three consecutive digits are a nonzero square.
0
100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1001, 1004, 1009, 1441, 1961, 2256, 4001, 4004, 4009, 4841, 6256, 7841, 9001, 9004, 9009, 10016, 10049, 40016, 40049, 90016, 90049, 100169, 400169, 900169
OFFSET
1,1
EXAMPLE
2256 is in this sequence because 225 and 256 are both squares.
PROG
(Python)
from math import isqrt
def ok(n): s = str(n); return len(s)>=3 and all((x:=int(s[i:i+3]))>0 and isqrt(x)**2==x for i in range(len(s)-2))
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Dec 14 2023
CROSSREFS
Cf. A000290, A291334 (2 or more digits).
Sequence in context: A328864 A143919 A071987 * A095633 A228103 A331543
KEYWORD
nonn,base,fini,full
AUTHOR
Gonzalo Martínez, Dec 14 2023
STATUS
approved