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-9 of 9 results.

A048880 Primes of form pq+2 where p and q are consecutive primes.

Original entry on oeis.org

17, 37, 79, 223, 439, 4759, 22501, 32401, 53359, 57601, 60493, 72901, 77839, 95479, 99223, 159199, 164011, 176401, 194479, 239119, 324901, 378223, 416023, 497011, 680623, 756853, 804511, 1115113, 1664101, 1742401, 2223079
Offset: 1

Views

Author

Herman H. Rosenfeld (herm3(AT)pacbell.net)

Keywords

Comments

All terms > 17 are congruent to 1 mod 6. - Zak Seidov, Dec 03 2010

Examples

			487*491+2=239119.
		

Crossrefs

Programs

  • Maple
    with (numtheory): for n from 1 to 1000 do if (tau(ithprime(n)*ithprime(n+1)+2)=2) then print(ithprime(n),ithprime(n+1),ithprime(n)*ithprime(n+1)+2); fi; od;
  • Mathematica
    Reap[Do[If[PrimeQ[p=Prime[k]*Prime[k+1]+2],Sow[p]],{k,1,430}]][[2,1]] (* Zak Seidov Dec 03 2010 *)

Formula

a(n) = 6*A342564(n-1) + 1 for n >= 2. - Hugo Pfoertner, Jun 24 2021

Extensions

Corrected and extended by Joe DeMaio (jdemaio(AT)kennesaw.edu).

A240596 Primes of the form p*q*r + 2 where p, q and r are consecutive primes.

Original entry on oeis.org

107, 4201, 18181981, 29884303, 72147193, 81927499, 208506511, 383148631, 402473443, 1106558899, 1391119621, 1459314919, 1498299289, 1945171369, 4593570199, 7908301729, 8052037969, 9970592521, 10594343761, 11304695329, 14119758703, 15111907009, 23157107803
Offset: 1

Views

Author

K. D. Bajpai, Apr 08 2014

Keywords

Comments

All the terms in the sequence, except a(1), are congruent to 1 mod 6.

Examples

			107 is prime and appears in the sequence because 107 = (3*5*7)+2.
4201 is prime and appears in the sequence because 4201 = (13*17*19)+2.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a, b; a:=ithprime(n)*ithprime(n+1)*ithprime(n+2); b:=a+2; if isprime(b) then RETURN (b); fi; end: seq(KD(), n=1..1000);
  • Mathematica
    Select[Table[Prime[k]*Prime[k+1]*Prime[k+2]+2,{k,1,300}],PrimeQ]
    Select[Times@@@Partition[Prime[Range[600]],3,1]+2,PrimeQ] (* Harvey P. Dale, Nov 21 2018 *)
  • PARI
    s=[]; for(k=1, 1000, t=prime(k)*prime(k+1)*prime(k+2)+2; if(isprime(t), s=concat(s, t))); s \\ Colin Barker, Apr 09 2014

A240715 Primes p such that p*q*r + 6 and p*q*r - 6 are primes where q and r are the next two primes after p.

Original entry on oeis.org

569, 1531, 1549, 7103, 7451, 9013, 10627, 10853, 11779, 11783, 12671, 12941, 14821, 14851, 17489, 18493, 20717, 20959, 25237, 26309, 27739, 29669, 29873, 34549, 35977, 36251, 37591, 38351, 38639, 39551, 40129, 45589, 46957, 47317, 48781, 55163, 55259
Offset: 1

Views

Author

K. D. Bajpai, Apr 10 2014

Keywords

Examples

			569 is in the sequence because 569*571*577 + 6 = 187466729 and 569*571*577 - 6 = 187466717 are both prime where 571 and 577 are the next two primes after 569.
1531 is in the sequence because 1531*1543*1549 + 6 = 3659253823 and 1531*1543*1549 - 6 = 3659253811 are both prime where 1543 and 1549 are the next two primes after 1531.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10^5) | IsPrime(t-6) and IsPrime(t+6) where t is p*NextPrime(p)*NextPrime(NextPrime(p))]; // Bruno Berselli, Apr 11 2014
  • Maple
    KD := proc(n) local a,b,d; a:=ithprime(n)*ithprime(n+1)*ithprime(n+2); b:=a+6; d:=a-6; if  isprime(b) and isprime(d) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..10000);
  • Mathematica
    c = 0; Do[If[PrimeQ[Prime[n]*Prime[n+1]*Prime[n+2] +6] && PrimeQ[Prime[n]*Prime[n+1]*Prime[n+2] -6],c=c+1;Print[c, " ", Prime[n]]],{n,1,500000}];
    KD={};   f=Prime[n+1]*Prime[n+2];  Do[p=Prime[n]; If[ PrimeQ[p*f+6] && PrimeQ[p*f-6], AppendTo[KD,p]], {n,10000}]; KD
    Select[Partition[Prime[Range[6000]],3,1],AllTrue[Times@@#+{6,-6},PrimeQ]&][[All,1]] (* Harvey P. Dale, Oct 29 2022 *)

A108013 Primes p such that p + 2 and p*(p + 2) + 2 are primes.

Original entry on oeis.org

3, 5, 149, 179, 239, 269, 419, 569, 1289, 1319, 2309, 2549, 2729, 3359, 3389, 4259, 4649, 5849, 5879, 6359, 6779, 8999, 9239, 9629, 10529, 10889, 11969, 13679, 13829, 14009, 14549, 16229, 16649, 18059, 18119, 18539, 19139, 19379, 21599, 21839
Offset: 1

Views

Author

Cino Hilliard, May 30 2005

Keywords

Comments

Except for the first 2 terms, these numbers all end in 9. Proof: Any odd prime p>5 can have one of the following forms: 10k+1, 10k+3, 10k+7, 10k+9.
10k+1 => p(p+2)+2 ends in 5, hence not prime, so p <> form 10k+1.
10k+3 => (p+2) ends in 5, hence not prime, so p <> form 10k+3.
10k+7 => p(p+2)+2 ends in 5, hence not prime, so p <> form 10k+7.
Thus p is of the form 10k+9 as stated. Moreover, p+2 ends in 1 and p(p+2)+2 is of the form 100h+1 since (10k+9)(10k+11)+2 = 100(k^2+2k+1)+1.
Subsequence of A051507. All terms larger than 5 are congruent to 29 mod 30. - Zak Seidov

Examples

			149*151 + 2 = 22501. 149, 151, and 22501 are all prime so 149 is in the sequence.
		

Crossrefs

Cf. A051779.

Programs

  • Magma
    [p: p in PrimesUpTo(25000)|  IsPrime(p+2) and IsPrime(p^2+2*p+2)] // Vincenzo Librandi, Jan 29 2011
  • Mathematica
    Select[Prime@ Range@ 3000, AllTrue[{#2, #1 #2 + 2}, PrimeQ] & @@ {#, # + 2} &] (* Michael De Vlieger, Jan 22 2018 *)
  • PARI
    g(n,k) = forprime(x1=3,n, x2=x1+2; if(isprime(x2), p=x1*x2+k; if(isprime(p), print1(x1",") ) ) )
    

A224789 Primes p such that both p + nextprime(p) + 1 and p*nextprime(p) + 2 are primes.

Original entry on oeis.org

5, 7, 13, 19, 67, 229, 269, 307, 313, 401, 439, 613, 643, 863, 1051, 1693, 1783, 1999, 2143, 2239, 2309, 2423, 2549, 2753, 2819, 3037, 3079, 3089, 3361, 3373, 3389, 3677, 3863, 3877, 4139, 4259, 4519, 4663, 4909, 4933, 5323, 5527, 5581, 5849, 6359, 6577
Offset: 1

Views

Author

Jayanta Basu, Apr 17 2013

Keywords

Comments

Intersection of A051507 and A177017.

Examples

			5 is a member since 5 + 7 + 1 = 13 and 5 * 7 + 2 = 37 are both primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[900]], PrimeQ[# + NextPrime[#] + 1] && PrimeQ[#*NextPrime[#] + 2] &]
    npQ[n_]:=Module[{np=NextPrime[n]},AllTrue[{n+np+1,n*np+2},PrimeQ]]; Select[ Prime[ Range[900]],npQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 04 2017 *)

A240618 Primes p such that p*q*r + 2 is prime, where q and r are the next two primes after p.

Original entry on oeis.org

3, 13, 257, 307, 409, 431, 587, 719, 733, 1031, 1109, 1123, 1129, 1237, 1657, 1987, 1999, 2143, 2179, 2239, 2411, 2467, 2843, 3041, 3191, 3433, 3691, 3943, 4051, 4219, 4289, 4561, 4567, 4721, 4817, 4831, 4943, 4993, 5521, 5563, 5623, 5689, 5813, 6257, 6983, 7043
Offset: 1

Views

Author

K. D. Bajpai, Apr 09 2014

Keywords

Comments

All the terms in the sequence, except a(1), are congruent to 1 mod 6.

Crossrefs

Programs

  • Maple
    KD := proc(n) local a,b; a:=ithprime(n)*ithprime(n+1)*ithprime(n+2); b:=a+2; if  isprime(b) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..2000);
  • Mathematica
    KD={}; Do[p=Prime[n]; If[PrimeQ[p*Prime[n+1]*Prime[n+2] + 2], AppendTo[KD,p]], {n,1000}]; KD

A240621 Primes p such that p*q + 6 and p*q - 6 are primes where p and q are consecutive primes.

Original entry on oeis.org

5, 7, 11, 19, 23, 37, 79, 97, 307, 349, 439, 479, 503, 719, 907, 983, 991, 1061, 1069, 1109, 1597, 1609, 1621, 1867, 2111, 2609, 3301, 3371, 3851, 4129, 4211, 4639, 4999, 5119, 5471, 5683, 5779, 5867, 5939, 6563, 7951, 9337, 9461, 9551, 10061, 10181, 10273, 12251
Offset: 1

Views

Author

K. D. Bajpai, Apr 09 2014

Keywords

Examples

			7 is in the sequence because 7*11 + 6 = 83 and 7*11 - 6 = 71 are both prime where 7 and 11 are consecutive primes.
37 is in the sequence because 37*41 + 6 = 1523 and 37*41 - 6 = 1511 are both prime where 37 and 41 are consecutive primes.
		

Crossrefs

Programs

  • Maple
    KD := proc(n) local a,b,d; a:=ithprime(n)*ithprime(n+1); b:=a+6; d:=a-6; if  isprime(b) and isprime(d) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..5000);
  • Mathematica
    Select[Partition[Prime[Range[1500]],2,1],AllTrue[Times@@#+{6,-6},PrimeQ]&][[All,1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 21 2017 *)
  • PARI
    isok(p) = isprime(p) && (q = nextprime(p+1)) && isprime(p*q-6) && isprime(p*q+6); \\ Michel Marcus, Apr 12 2014

A240725 Primes p such that p^2*q^2*r^2 + 12 and p^2*q^2*r^2 - 12 are primes where q and r are next two primes after p.

Original entry on oeis.org

23, 31, 43, 521, 1061, 2153, 3457, 4019, 4943, 5477, 6991, 7577, 8291, 8539, 10993, 11953, 14767, 17957, 18439, 26321, 40993, 41047, 53269, 57917, 71347, 79979, 80989, 88997, 91499, 92269, 94561, 108457, 109111, 112019, 117671, 121763, 133103, 140407, 147073
Offset: 1

Views

Author

K. D. Bajpai, Apr 11 2014

Keywords

Comments

In the expression prime(n)^2 * prime(n+1)^2 * prime(n+2)^2 +/- c, c = 12 is the smallest integer that yields a sequence of such primes. That means for c = 1...11 no such sequence with a large number of primes is obtained.

Examples

			23 is prime and appears in the sequence because 23^2 * 29^2 * 31^2 + 12 = 427538341 and 23^2 * 29^2 * 31^2 - 12 = 427538317 are both prime where 29 and 31 are the next two primes after 23.
31 is prime and appears in the sequence because 31^2 * 37^2 * 41^2 + 12 = 2211538741 and 31^2 * 37^2 * 41^2 - 12 = 2211538717 are both prime where 37 and 41 are the next two primes after 31.
		

Crossrefs

Programs

  • Maple
    KD := proc(n) local a, b, d; a:=ithprime(n)^2*ithprime(n+1)^2*ithprime(n+2)^2; b:=a+12; d:=a-12; if  isprime(b) and isprime(d) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..20000);
  • Mathematica
    c=0;Do[If[PrimeQ[Prime[n]^2*Prime[n+1]^2*Prime[n+2]^2+12]&&PrimeQ[Prime[n]^2*Prime[n+1]^2*Prime[n+2]^2-12],c=c+1;Print[c," ", Prime[n]]], {n,1,1000000}];
    KD = {}; Do[p = Prime[n]; If[PrimeQ[Prime[n]^2*Prime[n + 1]^2*Prime[n + 2]^2 + 12] && PrimeQ[Prime[n]^2*Prime[n + 1]^2*Prime[n + 2]^2 - 12], AppendTo[KD, p]], {n, 10000}]; KD

A340468 a(n) is the least prime of the form 2 + Product_{i=n..m} prime(i).

Original entry on oeis.org

5, 7, 79, 13, 223, 19, 439, 130753887906569681111538991218568790437537693430279000532630035672131604633987039552816424896353327834998483765849409837393409377729040653460715050958787058270805333463, 31, 34826927179023475480751694965449235272424989980919
Offset: 2

Views

Author

Robert Israel, Jan 08 2021

Keywords

Comments

If n is in A029707, a(n) = 2+prime(n).
If n is not in A029707 but prime(n) is in A051507, a(n) = 2+prime(n)*prime(n+1).
a(15) > 10^1000 if it exists.

Examples

			a(2) = 2+3 = 5.
a(3) = 2+5 = 7.
a(4) = 2+7*11 = 79.
a(5) = 2+11 = 13.
a(6) = 2+13*17 = 223.
a(7) = 2+17 = 19.
a(8) = 2+19*23 = 439.
a(9) = 2+23*29*...*431.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local i,t;
      t:= 1;
      for i from n do
        t:= t*ithprime(i);
        if isprime(t+2) then return t+2 fi;
      od
    end proc:
    seq(f(n),n=2..14);
  • Python
    from sympy import isprime, nextprime, prime
    def a(n):
      prodpnpm = pm = prime(n)
      while not isprime(2+prodpnpm): pm = nextprime(pm); prodpnpm *= pm
      return 2+prodpnpm
    print([a(n) for n in range(2, 12)]) # Michael S. Branicky, Jan 08 2021
Showing 1-9 of 9 results.