login
Least integer not occurring earlier, divisible by the n-th digit (or 10 for digit '0') of the sequence.
2

%I #19 Jan 02 2023 12:30:48

%S 1,2,3,4,5,6,7,8,9,10,20,12,30,11,14,15,40,13,16,17,24,18,25,28,50,19,

%T 21,22,36,23,35,26,32,27,48,34,45,38,56,55,60,29,54,42,31,44,46,33,66,

%U 52,39,51,65,58,72,57,62,64,49,68,80,63,76,84,70,69,88,75,78,85,90,96,100,74,81

%N Least integer not occurring earlier, divisible by the n-th digit (or 10 for digit '0') of the sequence.

%C The first 10 terms are justified "a posteriori", i.e., they add the digit used in their own check for divisibility. Note that the title and definition (but not example) in Angelini's original post (cf. link) corresponds to a much more involved self-referencing sequence.

%C Primes > 7 occur at indices corresponding to digits "1" of the concatenated terms, e.g., 11=a(14), and the 14th digit is the "1" in a(12)=12. The converse is not true, e.g., the 10th, 19th, 22nd, 28th and 34th digits are "1" but for these n, a(n) is composite. The next counterexample is n=187, the last of 5 consecutive indices of "1"s. See A210539 for the list of these counterexamples and more details.

%H M. F. Hasler, <a href="/A210538/b210538.txt">Table of n, a(n) for n = 1..3702</a>

%H Eric Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2012-March/009223.html">a(n) is divisible by the a(n)th digit of S</a>, SeqFan list, Mar 22 2012

%e Cf. link.

%o (PARI) {S=[u=0]; while(#S<99, for(a=1,9e9, bittest(u,a)&next; a>9 & a%if(S[1],S[1],10) & next; print1(a, ", "); u+=1<<a; a>10 & S=concat(vecextract(S,"^1"),eval(Vec(Str( a ))));break))}

%K nonn,base

%O 1,2

%A _M. F. Hasler_, following the idea of _Eric Angelini_, Mar 22 2012