login
Least k > a(n-1) such that k^3 has no digit in common with a(n-1) and a(n+1), a(0)=0.
1

%I #13 Nov 10 2017 16:12:40

%S 0,1,2,4,5,6,7,8,9,10,29,55,88,90,111,200,211,400,518,654,888,889,

%T 1111,2825,3131,4244,11111,28222,31535,42449,53355,90000,111181,

%U 590000,618181,900000,1111115,9000000,11111115,60660090,114144155

%N Least k > a(n-1) such that k^3 has no digit in common with a(n-1) and a(n+1), a(0)=0.

%C This is the sequence which corresponds to the original definition of A030290, before it was corrected to reproduce the data (and the intended meaning).

%e a(3) cannot be 3 because 3^3 = 27 would have the digit '2' in common with a(2) = 2, therefore a(3) = 4, which does not violate this condition.

%e After a(9) = 10, none of the numbers { 11, ..., 19 } can follow, because they have the digit '1' in common with a(9)^3 = 1000. Numbers { 20, ..., 28 } are excluded because their cube would have a digit '0' or '1' in common with a(9). Therefore, a(10) = 29 which hasn't a digit in common with a(9)^3, nor has 29^3 = 24389 a digit in common with a(9).

%e a(38) = 11111115 with 11111115^3 = 1371743552812575445875 using all digits except for 0, 6 and 9. So a(39) = 60660090 is possible, with a(39)^3 = 223207688999086038729000 having all digits except for 1, 4 and 5.

%o (PARI) nxt(a,L=oo,D(a)=Set(digits(a)),S=D(a),T=D(a^3))={for(k=a+1,L, #setintersect(D(k),T)||#setintersect(D(k^3),S)||return(k))}

%o A294662=List(); a=0; until(!a=nxt(a,1e7),write("/tmp/A294662.txt",#A294662," ",a);listput(A294662,a))

%Y Cf. A030290, A294663.

%K nonn,base

%O 0,3

%A _M. F. Hasler_, Nov 09 2017