[go: up one dir, main page]

login
The concatenation pkp is the number obtained by placing prime p either side of R_k, the k-th repunit (1, k times); a(n) is the smallest k such that pkp is prime, where p=prime(n), or -1 if no such k exists.
0

%I #18 May 05 2019 10:35:12

%S -1,1,-1,10905,15,2,1,2,3,1,3,173,1,14,1,43,1,5,11,1,2,3,3,1,2,-1,5,

%T 421,3,1,-1,1,1,3,-1,15,-1,3,3,163,-1,3,13,-1,679,-1,5,5,-1,107,93,1,

%U -1,3,-1,1,-1,9,5,-1,-1,9,1089,-1,3,7,3,15,-1,27,-1,1,-1,27,17,25,1,15,3

%N The concatenation pkp is the number obtained by placing prime p either side of R_k, the k-th repunit (1, k times); a(n) is the smallest k such that pkp is prime, where p=prime(n), or -1 if no such k exists.

%C Primes (from above data) for which pkp is composite for all k are 2, 5, 101, 127, 149, 157, 179, 193, 199, 227, 241, 257, 269, 281, 283, 311, 347, 353, 367. In every case the factorization of pkp contains at least one characteristic prime divisor (very different from A306861).

%C Conjecture: There are an infinite number of -1 terms in this sequence.

%F If prime(n) is a repunit prime R_k, for some k in A004023 and R_t is the smallest repunit prime such that t > 2*k, then a(n)=R_(t-2*k).

%e 2/2k2, 5/5k5, 7/101k101, 11,13/127k127, 11/149k149, for all k, so a(1)=a(3)=a(26)= a(31)=a(35)=-1. For prime(n)=A004023(2)=R_19, a(n)=R_(317-2*19)=R_279.

%p P(p) := proc (p::prime, N::posint := 5000) local n, k, m0, m; n := length(p); for k from 1 to N do m0 := add(10^i, i = 0 .. k-1); m := p*10^(k+n)+m0*10^n+p; if isprime(m) then return k end if; if `mod`(k, 1000) = 0 then print(k) end if end do end proc; P(p) # substitute a prime p here to run the code, it produces an answer (k) if one exists <=N and terms must be computed one at a time.

%Y Cf. A002275, A004022, A004023, A069687, A306861.

%K sign,base

%O 1,4

%A _David James Sycamore_, May 02 2019