cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A307873 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.

This page as a plain text file.
%I A307873 #18 May 05 2019 10:35:12
%S A307873 -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 A307873 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 A307873 -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 A307873 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 A307873 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 A307873 Conjecture: There are an infinite number of -1 terms in this sequence.
%F A307873 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 A307873 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 A307873 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 A307873 Cf. A002275, A004022, A004023, A069687, A306861.
%K A307873 sign,base
%O A307873 1,4
%A A307873 _David James Sycamore_, May 02 2019