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!)
A030461 Primes that are concatenations of two consecutive primes. 22

%I #36 Sep 08 2022 08:44:50

%S 23,3137,8389,151157,157163,167173,199211,233239,251257,257263,263269,

%T 271277,331337,353359,373379,433439,467479,509521,523541,541547,

%U 601607,653659,661673,677683,727733,941947,971977,10131019

%N Primes that are concatenations of two consecutive primes.

%C Any term in the sequence (apart from the first) must be a concatenation of consecutive primes differing by a multiple of 6. - _Francis J. McDonnell_, Jun 26 2005

%H Georg Fischer, <a href="/A030461/b030461.txt">Table of n, a(n) for n = 1..5720</a> [First 1000 terms from Zak Seidov]

%F A030461(n) = concat(A030459(n),A030460(n)) = A045533( A000720( A030459(n))). - _M. F. Hasler_, Feb 06 2011

%e a(2) is 3137 because 31 and 37 are consecutive primes and after concatenation 3137 is also prime. - _Enoch Haga_, Sep 30 2007

%p 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_

%t Select[Table[p=Prime[n]; FromDigits[Join[Flatten[IntegerDigits[{p,NextPrime[p]}]]]],{n,170}],PrimeQ] (* _Jayanta Basu_, May 16 2013 *)

%o (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<m,q=nextprime(p+1);s="";v=digits(p);for(j=1,length(v),s=concat(s,v[j])); v=digits(q);for(j=1,length(v),s=concat(s,v[j]));if(isprime(k=eval(s)),print1(k,","));p=q)} \\ _Klaus Brockhaus_

%o (PARI) o=2;forprime(p=3,1e4, isprime(eval(Str(o,o=p))) & print1(precprime(p-1),p",")) \\ _M. F. Hasler_, Feb 06 2011

%o (Haskell)

%o a030461 n = a030461_list !! (n-1)

%o a030461_list = filter ((== 1) . a010051') a045533_list

%o -- _Reinhard Zumkeller_, Apr 20 2012

%o (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

%Y Cf. A030459.

%Y Cf. A185934, A185935.

%Y Subsequence of A045533.

%K nonn,base

%O 1,1

%A _Patrick De Geest_

%E Edited by _N. J. A. Sloane_, Apr 19 2009 at the suggestion of _Zak Seidov_

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 07:22 EDT 2024. Contains 371922 sequences. (Running on oeis4.)