OFFSET
1,2
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..10000
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
Jean-Marc Falcoz, Jan 16 2011
STATUS
approved