

A180109


a(1)=1 , thereafter, a(n) is the smallest integer k not yet in the sequence, such that k^2 contains in consecutive digits the decimal representation of a(n1)


1



1, 4, 2, 5, 15, 34, 59, 77, 76, 24, 18, 43, 66, 108, 33, 58, 126, 355, 596, 186, 432, 208, 457, 214, 463, 681, 41, 21, 11, 46, 68, 83, 94, 97, 176, 42, 65, 81, 9, 3, 6, 8, 17, 131, 146, 121, 110, 105
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



EXAMPLE

a(1)=1
a(2)=4, because 4^2=16 which contains 1
...
a(5)=15
a(6)=34, because 34^2=1156, which contains 15
a(7)=59, because 59^2=3481, which contains 34
...


MATHEMATICA

but = 1500000; s = {1}; f[x_] := (sc = Complement[Range[but] , s]; n = ToString[x]; j = 1; While[StringPosition[ToString[sc[[j]]^2], n] == {}, j++]; sc[[j]]); a = 1; k = 1; While[a < 10001, k = f[k]; AppendTo[s, k]; a++]; Print[s]


CROSSREFS



KEYWORD

base,nonn


AUTHOR



STATUS

approved



