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.

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