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.

Showing 1-4 of 4 results.

A030459 Prime p concatenated with next prime is also prime.

Original entry on oeis.org

2, 31, 83, 151, 157, 167, 199, 233, 251, 257, 263, 271, 331, 353, 373, 433, 467, 509, 523, 541, 601, 653, 661, 677, 727, 941, 971, 1013, 1033, 1181, 1187, 1201, 1223, 1259, 1367, 1453, 1459, 1657, 1669, 1709, 1741, 1861, 1973, 2069, 2161
Offset: 1

Views

Author

Keywords

Comments

Terms 157, 257, 263, 541, 1187, 1459, 2179 also belong to A030460. - Carmine Suriano, Jan 27 2011
All terms, except for the first one, must be either in A185934 or in A185935, i.e., have the same residue (mod 6) as the subsequent prime. - M. F. Hasler, Feb 06 2011

Crossrefs

See A030461 for the concatenated primes.

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ NextPrime[#]]]]]&] (* Harvey P. Dale, Jun 20 2011 *)
  • PARI
    o=2;forprime(p=3,1e4, isprime(eval(Str(o,o=p))) & print1(precprime(p-1)","))  \\ M. F. Hasler, Feb 06 2011

Formula

a(n) = A151799(A030460(n)).
A030461(n) = concat(a(n), A030460(n)) = A045533(A000720(a(n))).

A030461 Primes that are concatenations of two consecutive primes.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

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

Examples

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

Crossrefs

Cf. A030459.
Subsequence of A045533.

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(pKlaus 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

A030461(n) = concat(A030459(n),A030460(n)) = A045533( A000720( A030459(n))). - M. F. Hasler, Feb 06 2011

Extensions

Edited by N. J. A. Sloane, Apr 19 2009 at the suggestion of Zak Seidov

A267721 a(n) is the least term of A030461 with gap = 6*n between consecutive primes or 0 if no such term exists.

Original entry on oeis.org

3137, 199211, 523541, 16691693, 1393313963, 2428124317, 3498135023, 7318973237, 4028940343, 191353191413, 221327221393, 507217507289, 937253937331, 10402271040311, 843911844001, 25654632565559, 81661078166209, 55778515577959, 82237498223863
Offset: 1

Views

Author

Jean-Marc Rebert, Jan 20 2016

Keywords

Comments

Subsequence of A030461.
a(n) is the concatenation of the smallest prime p and the next prime q, such that p + 6n = q and the concatenations of these 2 primes is also prime. a(n) = 0 if no such term exists.

Examples

			a(1) = A030461(2) = 3137. gap =  37 - 31 = 6 = 6 * 1.
a(2) = 199211, because 199211 is the first term in A030461, with gap = 211 - 199 = 12 = 6 * 2.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[seq(i,i=3..10^7,2)]):
    cati:= (x,y) -> 10^(1+ilog10(y))*x+y;
    for i from 1 to nops(Primes)-1 do
      g:= Primes[i+1]-Primes[i];
      if g mod 6 <> 0 then next fi;
      if assigned(A[g/6]) then next fi;
      z:= cati(Primes[i],Primes[i+1]);
      if isprime(z) then A[g/6]:= z fi;
    od:
    seq(A[i],i=1..max(map(op,[indices(A)]))); # Robert Israel, Jan 24 2016

A178466 Primes prime(k) such that the concatenation prime(k+1)//prime(k) is also prime.

Original entry on oeis.org

3, 47, 53, 61, 131, 173, 199, 211, 233, 257, 353, 523, 587, 607, 619, 647, 653, 751, 797, 971, 991, 997, 1103, 1123, 1231, 1381, 1553, 1777, 1913, 1973, 1987, 2297, 2333, 2341, 2399, 2677, 2861, 3049, 3191, 3259, 3607, 3637, 3761, 3989
Offset: 1

Views

Author

Carmine Suriano, Jan 27 2011

Keywords

Comments

53, 211, 653, 997, ... are also in A088712.
The role of the two primes is swapped in comparison to A030459.
The result of the concatenation is in A088784.

Examples

			The prime 53 is in the sequence because the next prime is 59 and 5953 is a prime.
		

Crossrefs

Programs

  • Maple
    read("transforms") ;
    for n from 1 to 600 do p := ithprime(n) ; q := nextprime(p) ; r := digcat2(q,p) ; if isprime(r) then printf("%d,",p) ; end if; end do: # R. J. Mathar, Jan 27 2011
  • Mathematica
    Transpose[Select[Partition[Prime[Range[600]],2,1],PrimeQ[FromDigits[ Flatten[ IntegerDigits/@Reverse[#]]]]&]][[1]]  (* Harvey P. Dale, Feb 02 2011 *)

Formula

a(n) = A151799(A088712(n)).
Showing 1-4 of 4 results.