A333085 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).
11, 41, 61, 83, 113, 101, 151, 181, 233, 223, 263, 293, 353, 383, 419, 401, 479, 467, 541, 1009, 599, 631, 661, 691, 727, 751, 787, 797, 809, 877, 907, 919, 967, 991, 9001, 1031, 1063, 1151, 1171, 1187, 1201, 1237, 1303, 1321, 1361, 1373, 1453, 1481, 1597, 1601
Offset: 1
Examples
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. 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. a(3) = 61 says "In position 6 is a 1"; again, there's no smaller solution. a(4) = 83 says "In position 8 is a 3", and this is again the smallest solution. a(5) = 113 says "In position 11 is a 3": again the last digit of a(5) itself, and there is no smaller solution. a(6) = 101 says: "In position 10 is a 1." (This term wasn't possible earlier, but at this position it is.) 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.
Links
- M. F. Hasler, Table of n, a(n) for n = 1..10000, Mar 19 2020
- Eric Angelini, Primes describing digit positions, SeqFan mailing list, March 2, 2020.
- M. F. Hasler, PARI/GP program to compute the first N terms of the sequence, Mar 19 2020
- M. F. Hasler, Table of n, a(n) for n = 1..30000, Mar 20 2020
Crossrefs
Cf. A264646 (n concatenated with the n-th digit of S).
Programs
-
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
Extensions
Edited by M. F. Hasler, Mar 18 2020
Comments