A309749 Primes p such that the base-10 concatenations (p+1)||p and (p+1)||(p+1)||p are both prime.
3, 197, 263, 281, 443, 881, 887, 947, 2111, 2129, 2237, 2699, 2741, 2897, 3251, 3539, 3821, 3881, 4049, 4451, 4523, 4787, 6257, 6389, 8609, 8741, 10163, 10193, 10247, 11027, 13187, 14591, 14897, 16193, 16901, 17027, 18797, 19319, 19379, 20147, 20681, 21563, 21647, 22073, 22259
Offset: 1
Examples
a(3) = 263 is in the sequence because 263, 264263 and 264264263 are all prime.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A309935.
Programs
-
Magma
[p:p in PrimesUpTo(23000)|IsPrime(Seqint(Intseq(p) cat Intseq(p+1))) and IsPrime(Seqint(Intseq(p) cat Intseq(p+1) cat Intseq(p+1)))]; // Marius A. Burtea, Aug 27 2019
-
Maple
filter:= proc(n) local v,w,q; if not isprime(n) then return false fi; v:= 10^(1+ilog10(n)); q:= v*(n+1)+n; if not isprime(q) then return false fi; isprime((10^(1+ilog10(q))+v)*(n+1)+n) end proc: select(filter, [3,seq(i,i=5..100000,6)]);
-
Mathematica
pcQ[n_]:=Module[{idn=IntegerDigits[n],idn2=IntegerDigits[n+1]}, AllTrue[ {FromDigits[ Join[ idn2,idn]],FromDigits[ Join[idn2,idn2,idn]]},PrimeQ]]; Select[Prime[Range[2500]],pcQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 11 2019 *)
Comments