

A232210


Let b_k=3...3 consist of k>=1 3's. Then a(n) is the smallest k such that the concatenation prime(n)b_k is prime, or a(n)=0 if there is no such prime.


10



1, 0, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 3, 1, 2, 6, 2, 2, 1, 1, 2, 1, 4, 4, 23, 1, 2, 1, 6, 2, 2, 5, 1, 10, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 2, 4, 2, 1, 1, 1, 2, 4, 1, 2, 5, 4, 2, 3, 1, 1, 5, 4, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 6, 4, 2, 14, 2, 4, 1, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,6


COMMENTS

Conjecture: for n>=3, a(n)>0.
Records are 1,14,23,50,252,4752,...
The corresponding primes are 2,13,131,653,883,1279,...
These primes beginning with the second one we call "stubborn primes".
If a(n)=1, then the resulting primes are in A092993 and form A055782; if a(n)=2, then they form sequence 4133,4733,5333,7933,..., etc.  Vladimir Shevelev, Oct 16 2014
If a prime p divides Pb_k, then it also divides Pb_{k+m(p1)} for all m>=0. This follows from Fermat's little theorem applied to b_x=(10^x1)/3 with x=p1.  M. F. Hasler, Oct 20 2014


LINKS



EXAMPLE

For n=1, start with prime(1)=2 and get already at the first step the prime 23. So a(1)=1.
For n=2, starting with prime(2)=3, one never gets a prime by appending further digits "3", therefore a(2)=0.
For n=3, n=4, n=5, one gets after the first step the primes 53, 73, 113, and therefore a(n)=1.
For n=6, start with prime(6)=13; one has to append 14 "3"s in order to get a new prime, so a(6)=14.
For n=2889, start with prime(2889) = 26293. (Do not mix up with prime(2899) = 26393...!) Appending 2k1 or 6k4 or 6k2 or 18k6 or 36k18 or 180k144 digits "3" yields a number divisible by 11 resp. 7 resp. 13 resp. 19 resp. 101 resp. 31. For 18k12 and 36k (with k <> 1 (mod 5)) digits "3" there is no simple pattern and both yield sometimes large primes in the factorization, but (so far) always composite numbers 26293...3 (up to several thousand digits).  M. F. Hasler, Oct 16 2014


MATHEMATICA

f[n_] := Block[{k = 1, p = Prime@ n}, While[ !PrimeQ[p*10^k + (10^k  1)/3], k++]; k]; f[2] = 0; Array[f, 100] (* Robert G. Wilson v, Apr 24 2015 *)
m3[n_]:=Module[{k=10n+3}, While[!PrimeQ[k], k=10k+3]; IntegerLength[k]IntegerLength[ n]]; Join[{1, 0}, m3/@Prime[Range[3, 90]]] (* Harvey P. Dale, Feb 11 2018 *)


PROG

(PARI) a(n) = {if (n==2, return (0)); p = prime(n); k = 1; while (! isprime(p = p*10+3), k++); k; } \\ Michel Marcus, Sep 13 2014


CROSSREFS



KEYWORD

nonn,base


AUTHOR



EXTENSIONS



STATUS

approved



