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
-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, 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, 22, 3, 4, 2, 4, 5, 1, 12, 5, 13, 3, 9, 1, 6, 60, 2, 1, 58 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
For p = 2,11,37,101 kpk is composite for all k, hence a(n) = -1.
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.
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.
Conjecture: There are infinitely many -1 terms in this sequence.
This is a subsequence of A272232. - Hans Havermann, May 17 2022
LINKS
Hans Havermann, Prime sandwiches (includes a link to a table giving particulars for all primes <10^5)
EXAMPLE
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.
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.
For a(78) (p=397) no k (up to 30000) has been found such that kpk is prime.
MAPLE
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
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).
CROSSREFS
Sequence in context: A115716 A079412 A356655 * A262940 A278601 A281038
KEYWORD
sign,base,more
AUTHOR
STATUS
approved

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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)