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).

A048797 Primes p such that pp'-2 is prime, where p' denotes the next prime after p.

Original entry on oeis.org

3, 157, 211, 257, 367, 557, 977, 997, 1381, 1511, 1531, 2467, 2503, 2621, 2777, 2861, 3049, 3307, 3617, 4099, 4357, 4373, 4397, 4463, 4523, 4691, 4831, 4919, 5087, 5209, 5261, 5351, 5407, 5483, 5807, 6173, 6229, 6287, 6619, 6871, 7001, 7187, 7459, 7577
Offset: 1

Views

Author

Joseph L. Pe, Jan 15 2002

Keywords

Examples

			3*5 - 2 = 13, a prime, so 3 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Prime[ Select[ Range[1000], PrimeQ[ Prime[ # ]Prime[ # + 1] - 2] &]]
    Select[Prime[Range[1000]],PrimeQ[# NextPrime[#]-2]&] (* Harvey P. Dale, Aug 05 2024 *)
  • PARI
    lista(nn) = {my(p=2); forprime(q=3, nn, if (isprime(p*q-2), print1(p, ", ")); p = q;);} \\ Michel Marcus, Sep 28 2019

A342564 Numbers k such that 6*k + 1 is a prime that can be written as p*q + 2, with p and q being consecutive primes.

Original entry on oeis.org

6, 13, 37, 73, 793, 3750, 5400, 8893, 9600, 10082, 12150, 12973, 15913, 16537, 26533, 27335, 29400, 32413, 39853, 54150, 63037, 69337, 82835, 113437, 126142, 134085, 185852, 277350, 290400, 370513, 432553, 478837, 531037, 585937, 667333, 768980, 837013, 889350
Offset: 1

Views

Author

Hugo Pfoertner, Jun 20 2021

Keywords

Examples

			a(1) = 6 because 6*6 + 1 = 37 can be written as 5*7 + 2.
		

Crossrefs

Cf. A048880, whose first term 17 = 3*5 + 2 cannot be written as 6*k + 1.

Programs

  • Maple
    alist := proc(upto) local L, q, p, n, r; L := []; q := 2;
    for n from 1 to upto do
        p := q; q := nextprime(p); r := p * q + 1 ;
        if modp(r, 6) = 0 and isprime(r + 1) then
           L := [op(L), iquo(r, 6)] fi od;
    L end: alist(350); # Peter Luschny, Jun 20 2021
  • Mathematica
    (Select[6Range[10^6]+1, PrimeQ[#] && MatchQ[FactorInteger[#-2], {{p_, 1}, {q_, 1}} /; q == NextPrime[p]]&]-1)/6 (* Jean-François Alcover, Jul 07 2021 *)
  • PARI
    a342564(plim)={my(p1=5);forprime(p2=7,plim,my(p=p1*p2+2);if(isprime(p),print1((p-1)/6,", "));p1=p2)};
    a342564(2400)
    
  • Python
    from primesieve.numpy import n_primes
    from numbthy import isprime
    primesarray = numpy.array(n_primes(10000,1))
    for i in range (0, 9999):
        totest = int(primesarray[i] * primesarray[i+1] + 2)
        if (isprime(totest)) and  (((totest-1)%6) == 0):
            print((totest-1)//6) # Karl-Heinz Hofmann, Jun 20 2021

Formula

a(n) = (A048880(n+1) - 1)/6, excluding A048880(1).

A124669 Product of successive primes minus 2.

Original entry on oeis.org

4, 13, 33, 75, 141, 219, 321, 435, 665, 897, 1145, 1515, 1761, 2019, 2489, 3125, 3597, 4085, 4755, 5181, 5765, 6555, 7385, 8631, 9795, 10401, 11019, 11661, 12315, 14349, 16635, 17945, 19041, 20709, 22497, 23705, 25589, 27219, 28889, 30965, 32397
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2006

Keywords

Crossrefs

Cf. A123921.

Programs

  • Mathematica
    Times@@@Partition[Prime[Range[50]],2,1]-2 (* Harvey P. Dale, Nov 02 2020 *)
  • PARI
    g(n) = forprime(x=1,n,if(isprime(x+2),y=x*(x+2)-2;print1(y",")))

A342565 Numbers k such that 6*k - 1 is a prime that can be written as p*q - 2, with p and q being consecutive primes.

Original entry on oeis.org

4265, 7842, 11265, 22815, 52265, 160065, 167662, 322003, 383542, 393722, 1016815, 1051677, 1150182, 1290842, 1372803, 1555498, 1826015, 2184065, 2808498, 3168265, 3200307, 3231062, 3333117, 3427680, 3676962, 3913915, 4042598, 4323102, 4537907, 4623542, 4798955
Offset: 1

Views

Author

Hugo Pfoertner, Jun 20 2021

Keywords

Examples

			a(1) = 4265, because the prime 25589 = 6*4265 - 1 can be written as 157*163 - 2, with 157 and 163 being consecutive primes.
		

Crossrefs

Cf. A123921, whose first term 13 = 3*5 - 2 cannot be written as 6*k - 1.

Programs

  • PARI
    a342565(plim)={my(p1=5);forprime(p2=7,plim,my(p=p1*p2-2);if(isprime(p),print1((p+1)/6,", "));p1=p2)};
    a342565(5400)
    
  • Python
    from primesieve.numpy import n_primes
    from numbthy import isprime
    primesarray = numpy.array(n_primes(10000, 1))
    for i in range (0, 9999):
        totest = int(primesarray[i] * primesarray[i+1] - 2)
        if (isprime(totest)) and  (((totest+1)%6) == 0):
            print((totest+1)//6) # Karl-Heinz Hofmann, Jun 20 2021

Formula

a(n) = (A123921(n+1) + 1)/6, excluding A123921(1).

A124670 (Product of successive primes minus 2) divided by 3 is prime.

Original entry on oeis.org

11, 47, 73, 107, 587, 673, 3467, 3673, 4783, 7499, 10799, 17327, 29983, 33073, 62207, 71147, 72073, 137387, 225227, 243673, 252283, 355007, 442367, 504299, 554699, 567673, 735073, 874799, 924073, 961067, 1062073, 1175627, 1326673, 1486847
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2006

Keywords

Examples

			11*13 = 143, 143-2 = 141, 141/3 = 47 is the second entry.
		

Crossrefs

Cf. A123921.

Programs

  • Mathematica
    Select[(Times@@@Partition[Prime[Range[500]],2,1]-2)/3,PrimeQ] (* Harvey P. Dale, Oct 02 2012 *)
  • PARI
    g(n) = { for(x=1,n, y=prime(x)*prime(x+1)-2; if(y%3==0,if(isprime(y/3), print1(y/3",")))) }

A124684 Primes of the form (p*q - 2)/5 where p and q are successive primes.

Original entry on oeis.org

229, 1153, 14149, 15013, 189733, 214657, 253573, 350593, 514561, 522289, 725041, 853669, 1304581, 1453681, 2027569, 2183281, 2212453, 2469637, 3238513, 4166017, 4331941, 4467013, 5234689, 5510371, 5992933, 6102913, 8100097, 8130673
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2006

Keywords

Comments

These numbers times 5 are semiprimes.

Examples

			31*37 = 1147, 1147-2 = 1145, 1145/5 = 229 is a term.
		

Crossrefs

Cf. A123921.

Programs

  • Mathematica
    Select[(Times @@@ Partition[Prime[Range[1000]], 2, 1] - 2) / 5, PrimeQ] (* Amiram Eldar, May 26 2024 *)
  • PARI
    g(n,p=5) = { for(x=1,n, y=prime(x)*prime(x+1)-2; if(y%p==0,if(isprime(y/p), print1(y/p, ", ")))) }

A125502 (Product of successive primes minus 2) divided by 7 is prime.

Original entry on oeis.org

4127, 49727, 212627, 565727, 697727, 1152227, 3102227, 3486227, 5742227, 7488227, 8078627, 8848127, 10837727, 14200127, 23041427, 41870627, 50437727, 59044127, 68766227, 70088927, 91008227, 115141727, 118573727, 122641427
Offset: 1

Views

Author

Cino Hilliard, Dec 28 2006

Keywords

Examples

			167*173 = 28891, (28891-2)/7 = 4127 the first entry.
		

Crossrefs

Cf. A123921.

Programs

  • Mathematica
    Select[(Times@@@Partition[Prime[Range[5000]],2,1]-2)/7,PrimeQ] (* Harvey P. Dale, Sep 03 2015 *)
  • PARI
    g(n,p) = { for(x=1,n, y=prime(x)*prime(x+1)-2; if(y%p==0,if(isprime(y/p), print1(y/p",")))) }

Extensions

Typo in example corrected by Harvey P. Dale, Sep 03 2015

A229613 Primes of the form p*q - 30, where p and q are consecutive primes.

Original entry on oeis.org

5, 47, 113, 191, 293, 1117, 1487, 1733, 4057, 5153, 5737, 9767, 11633, 14321, 16607, 19013, 20681, 22469, 23677, 25561, 27191, 30937, 32369, 36833, 37991, 41959, 50591, 53327, 70717, 72869, 75037, 79493, 82889, 99191, 136861, 148957, 159167, 163979, 171341, 176369
Offset: 1

Views

Author

K. D. Bajpai, Sep 26 2013

Keywords

Comments

For primes p <= prime(5000) = 48611, the expression p*q - c with p and q consecutive primes yields more primes at c = 30 than at any other positive c <= 100.
For the above range of primes p, c=30 yields 999 primes, but there are values of c > 100 that yield larger counts; e.g., c = 210, 420, 2310, and 9240 yield 1129, 1194, 1295, and 1316, respectively. - Jon E. Schoenfield, Jun 25 2022

Examples

			prime(4)*prime(5) - 30 = 7*11 - 30 = 47, which is prime, so 47 is a term.
prime(11)*prime(12) - 30 = 31*37 - 30 = 1117, which is prime, so 1117 is a term.
		

Crossrefs

Cf. A123921.

Programs

  • Maple
    KD:= proc() local a; a:= ithprime(n)*ithprime(n+1)-30; if isprime((a)) then RETURN((a)):fi; end: seq(KD(),n=1..500);
  • Mathematica
    Select[Table[Prime[n]*Prime[n + 1] - 30, {n, 100}], PrimeQ]
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen():
        p, q = 2, 3
        while True:
            t = p*q-30
            if isprime(t):
                yield t
            p, q = q, nextprime(q)
    print(list(islice(agen(), 40))) # Michael S. Branicky, Jun 25 2022
Showing 1-9 of 9 results.