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”).
%I #9 Mar 31 2012 10:24:15
%S 1,4,2,5,15,34,59,77,76,24,18,43,66,108,33,58,126,355,596,186,432,208,
%T 457,214,463,681,41,21,11,46,68,83,94,97,176,42,65,81,9,3,6,8,17,131,
%U 146,121,110,105
%N 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(n-1)
%H Jean-Marc Falcoz, <a href="/A180109/b180109.txt">Table of n, a(n) for n = 1..10000</a>
%e a(1)=1
%e a(2)=4, because 4^2=16 which contains 1
%e ...
%e a(5)=15
%e a(6)=34, because 34^2=1156, which contains 15
%e a(7)=59, because 59^2=3481, which contains 34
%e ...
%t 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]
%K base,nonn
%O 1,2
%A _Jean-Marc Falcoz_, Jan 16 2011