A030461 Primes that are concatenations of two consecutive primes.
23, 3137, 8389, 151157, 157163, 167173, 199211, 233239, 251257, 257263, 263269, 271277, 331337, 353359, 373379, 433439, 467479, 509521, 523541, 541547, 601607, 653659, 661673, 677683, 727733, 941947, 971977, 10131019
Offset: 1
Examples
a(2) is 3137 because 31 and 37 are consecutive primes and after concatenation 3137 is also prime. - _Enoch Haga_, Sep 30 2007
Links
- Georg Fischer, Table of n, a(n) for n = 1..5720 [First 1000 terms from Zak Seidov]
Programs
-
Haskell
a030461 n = a030461_list !! (n-1) a030461_list = filter ((== 1) . a010051') a045533_list -- Reinhard Zumkeller, Apr 20 2012
-
Magma
[Seqint( Intseq(NthPrime(n+1)) cat Intseq(NthPrime(n)) ): n in [1..200 ]| IsPrime(Seqint( Intseq(NthPrime(n+1)) cat Intseq(NthPrime(n)) )) ]; // Marius A. Burtea, Mar 21 2019
-
Maple
conc:=proc(a,b) local bb: bb:=convert(b,base,10): 10^nops(bb)*a+b end: p:=proc(n) local w: w:=conc(ithprime(n),ithprime(n+1)): if isprime(w)=true then w else fi end: seq(p(n),n=1..250); # Emeric Deutsch
-
Mathematica
Select[Table[p=Prime[n]; FromDigits[Join[Flatten[IntegerDigits[{p,NextPrime[p]}]]]],{n,170}],PrimeQ] (* Jayanta Basu, May 16 2013 *)
-
PARI
{digits(n) = if(n==0,[0],u=[];while(n>0,d=divrem(n,10);n=d[1];u=concat(d[2],u));u)} {m=1185;p=2;while(p
Klaus Brockhaus -
PARI
o=2;forprime(p=3,1e4, isprime(eval(Str(o,o=p))) & print1(precprime(p-1),p",")) \\ M. F. Hasler, Feb 06 2011
Formula
Extensions
Edited by N. J. A. Sloane, Apr 19 2009 at the suggestion of Zak Seidov
Comments