A030288 a(n+1) is smallest square > a(n) having no digits in common with a(n), with a(0) = 0.
0, 1, 4, 9, 16, 25, 36, 49, 81, 225, 361, 400, 529, 676, 841, 900, 1156, 2209, 3136, 4225, 6889, 7225, 8100, 24336, 58081, 69696, 70225, 84681, 90000, 111556, 200704, 316969, 407044, 511225, 608400, 923521, 4000000, 5112121, 6036849
Offset: 0
Links
- David W. Wilson and Jon E. Schoenfield, Table of n, a(n) for n = 0..250 (first 231 terms from David W. Wilson)
Programs
-
Mathematica
FromDigits /@ NestList[Block[{k = Sqrt@ FromDigits@ # + 1, m}, While[ContainsAny[#, Set[m, IntegerDigits[k^2]]], k++]; m] &, {0}, 38] (* Michael De Vlieger, Nov 02 2017 *) ssga[a_]:=Module[{k=Floor[Sqrt[a]]+1},While[Length[Intersection[IntegerDigits[k^2],IntegerDigits[ a]]]> 0,k++];k^2]; NestList[ssga,0,40] (* Harvey P. Dale, Sep 10 2024 *)
-
PARI
next_A030288(n, D(n)=Set(digits(n)), S=D(n))={for(k=sqrtint(n)+1, oo, #setintersect(D(k^2), S)||return(k^2))} \\ Could be made more efficient by implementing the observed patterns, in particular for n >= 104. - M. F. Hasler, Nov 12 2017
Formula
a(n) = A030287(n)^2. - Michel Marcus, Nov 03 2017
Comments