login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Sequence of primes in which each term a(n) = 10*i + d gives the position i and value d of a digit in the concatenation of all terms (see comments).
1

%I #67 Dec 23 2024 14:53:46

%S 11,41,61,83,113,101,151,181,233,223,263,293,353,383,419,401,479,467,

%T 541,1009,599,631,661,691,727,751,787,797,809,877,907,919,967,991,

%U 9001,1031,1063,1151,1171,1187,1201,1237,1303,1321,1361,1373,1453,1481,1597,1601

%N Sequence of primes in which each term a(n) = 10*i + d gives the position i and value d of a digit in the concatenation of all terms (see comments).

%C a(n) = p says "In position 'floor(p/10)' is a digit 'p mod 10'."

%C Each term must be the smallest possible prime not used earlier.

%C a(1447) = 19173719153, a(3868) = 371379371929.

%C No further record value up to n = 10^4. Some earlier record values: a(19) = 541, a(20) = 1009, a(35) = 9001, a(110) = 10007, ..., a(142) = 30011, ..., a(278) = 70001, ..., a(474) = 90001, a(523) = 101009, a(657) = 191339, a(902) = 300007, ..., a(1386) = 300221. - _M. F. Hasler_, Mar 19 2020

%H M. F. Hasler, <a href="/A333085/b333085.txt">Table of n, a(n) for n = 1..10000</a>, Mar 19 2020

%H Eric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2020-March/020522.html">Primes describing digit positions</a>, SeqFan mailing list, March 2, 2020.

%H M. F. Hasler, <a href="https://docs.google.com/document/d/e/2PACX-1vTZmbr0f8MLHhqbobsH6BoXJ5aTvJNnI-bCvNUNlmQBLrrivtnducUmHVZIc_comxEhQRXDZh1mU24u/pub">PARI/GP program to compute the first N terms of the sequence</a>, Mar 19 2020

%H M. F. Hasler, <a href="/A333085/a333085.txt">Table of n, a(n) for n = 1..30000</a>, Mar 20 2020

%e a(1) = 11 says "In position 1 is a 1" - which is compatible with the term itself. Since any term must have at least two digits, this is certainly the smallest possibility.

%e a(2) = 41 says "In position 4 is a 1" - which is indeed the last digit of a(2). There is no smaller solution: the term cannot refer to the 2nd nor the 3rd digit of the sequence, since neither 21 nor 33 is prime.

%e a(3) = 61 says "In position 6 is a 1"; again, there's no smaller solution.

%e a(4) = 83 says "In position 8 is a 3", and this is again the smallest solution.

%e a(5) = 113 says "In position 11 is a 3": again the last digit of a(5) itself, and there is no smaller solution.

%e a(6) = 101 says: "In position 10 is a 1." (This term wasn't possible earlier, but at this position it is.)

%e a(19) = 541 says "In position 54 there is a 1", which is not yet there: position 54 is the first digit of a(20). So a(20) must start with a digit 1, and the smallest solution is a(20) = 1009, predicting a digit 9 in position 100.

%o (PARI) A333085_vec(n,d=[],U=[],F=[],k)={vector(n,i, forprime(p=11,, setsearch(U,p)&& next; k=divrem(p,10); k[1] > #d + logint(k[1],10)+1 || k[2] == if( k[1]<=#d, d[ k[1]], digits( k[1] )[ k[1]-#d ]) || next; for(i=1, #F, F[i][1] > #d + logint(p,10)+1 && break; F[i][2] == digits(p)[ F[i][1]-#d ] || next(2)); d=concat(d,digits(p)); break); while(#F && F[1][1]<=#d, F=F[^1]); k[1]>#d && F=setunion(F,[k]); U=setunion(U,primes([k[1],k[1]+1]*10)); [10,1]*k)} \\ For n > 500, use the much faster code given in LINKS. - _M. F. Hasler_, Mar 18 2020

%Y Cf. A264646 (n concatenated with the n-th digit of S).

%K nonn,base

%O 1,1

%A _Eric Angelini_ and _Hans Havermann_, Mar 07 2020

%E Edited by _M. F. Hasler_, Mar 18 2020