%I #23 Nov 10 2017 19:15:38
%S 0,1,2,3,4,5,6,7,9,15,19,20,23,26,29,30,34,47,56,65,83,85,90,156,241,
%T 264,265,291,300,334,448,563,638,715,780,961,2000,2261,2457,3335,5478,
%U 7154,9128,9569,14220,17654,20000,22609,26462,28604,30000
%N a(n) is the smallest k > a(n-1) such that k^2 has no digit in common with a(n-1)^2.
%C a(n) = sqrt(A030288(n)). - _Zak Seidov_, Feb 20 2009
%H David W. Wilson, <a href="/A030287/b030287.txt">Table of n, a(n) for n = 0..231</a>
%t Nest[Append[#, Block[{k = Last[#] + 1}, While[IntersectingQ @@ IntegerDigits@ {Last[#]^2, k^2}, k++]; k]] &, {0}, 50] (* _Michael De Vlieger_, Nov 03 2017 *)
%o (PARI) next_A030287(n,D=Set(digits(n^2)))=for(k=n+1,oo,#setintersect(Set(digits(k^2)),D)||return(k))
%o print1(a=0);for(i=1,99,print1(","a=next_A030287(a))) \\ _M. F. Hasler_, Nov 08 2017
%Y Cf. A030288: squares whose digits do not appear in previous term.
%Y Cf. A067581: a(n) has no digit of a(n-1).
%Y See also A294660.
%K nonn,base
%O 0,3
%A _Patrick De Geest_
%E Edited by _N. J. A. Sloane_, Feb 22 2009 at the suggestion of _R. J. Mathar_
|