login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306861 The concatenation kpk is the number obtained by placing k leading and trailing 1's around the prime p; a(n) is the smallest k such that kpk is prime, where p = prime(n), or -1 if no such k exists. 2

%I #39 May 18 2022 08:30:04

%S -1,1,1,3,-1,3,1,21,1,1,2,-1,3,2,1,1,42,14,3,73,3,2,1,4,3,-1,2,1,3,1,

%T 3,1,3,3,1,6,2,3,192,1,4,3,3,8,1,9,36,5,12,5,18,1,26,1,16,10,15,2,72,

%U 22,3,4,2,4,5,1,12,5,13,3,9,1,6,60,2,1,58

%N The concatenation kpk is the number obtained by placing k leading and trailing 1's around the prime p; a(n) is the smallest k such that kpk is prime, where p = prime(n), or -1 if no such k exists.

%C For p = 2,11,37,101 kpk is composite for all k, hence a(n) = -1.

%C For p = 397 (n=78), 563, 739, 1249, ... no k (<= 12000) has yet been found such that kpk is prime, but also there is no proof yet that k does not exist.

%C If p = prime(n) is an odd repunit prime, a(n) is half the difference in repunit length between p and the next repunit prime.

%C Conjecture: There are infinitely many -1 terms in this sequence.

%C This is a subsequence of A272232. - _Hans Havermann_, May 17 2022

%H Hans Havermann, <a href="http://gladhoboexpress.blogspot.com/2019/05/prime-sandwiches-made-with-one-derbread.html">Prime sandwiches</a> (includes a link to a table giving particulars for all primes <10^5)

%e a(1) = -1 because k2k is divisible by the (k+1)-th repunit for all k. The same argument applies to a(26) (p=101). a(2)=1 since 131 is prime, a(3)=1 since 151 is prime, a(4)=3 since 1117111 is prime. a(5)=-1 because k11k is always divisible by 11.

%e a(12) = -1 because the factor cycle for k37k comprises a covering congruence as follows: k==1 (mod 3)-->3|k37k; k==2 (mod 3)--> 13|k37k; k==3 (mod 3)--> 37|p37p.

%e For a(78) (p=397) no k (up to 30000) has been found such that kpk is prime.

%p Wrapped_prime := proc (p::prime, N::posint := 5000) local n, k, m0, m; n := length(p); for k to N do m0 := add(10^i, i = 0 .. k-1); m := m0+10^k*p+10^(k+n)*m0; if isprime(m) then return k end if end do end proc

%p Wrapped_prime(p). #Enter a value for p in this line and the code will calculate the first k for which kpk is prime (up to a max value of N, which can be chosen arbitrarily).

%Y Cf. A002275, A004022, A069687, A272232.

%K sign,base,more

%O 1,4

%A _David James Sycamore_, Mar 14 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)