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

A352948 Primes p such that p+2, (p^2-1)/2+p and (p^2+3)/2+3*p are also prime.

Original entry on oeis.org

5, 29, 599, 2687, 3557, 4337, 5009, 8597, 23687, 26249, 26699, 36527, 37307, 39509, 55049, 59669, 61559, 65519, 69497, 72269, 72869, 74507, 75209, 81017, 82559, 87557, 92639, 93479, 97157, 102407, 103289, 106217, 114689, 120917, 136067, 140627, 147449, 156797, 162749, 167117, 179999, 181397
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Apr 10 2022

Keywords

Comments

Lower twin primes p such that if q = p+2, (p*q-1)/2 and (p*q-1)/2+p+q are also prime.

Examples

			a(3) = 599 is a term because it, 599+2 = 601, (599*601-1)/2 = 179999, and 179999+599+601 = 181199 are prime.
		

Crossrefs

Subset of A109945.
Cf. A001359.

Programs

  • Mathematica
    Select[Range[200000], And @@ PrimeQ[{#, # + 2, (#^2 - 1)/2 + # , (#^2 + 3)/2 + 3*#}] &] (* Amiram Eldar, Apr 10 2022 *)
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        p, q = 3, 5
        while True:
            if q == p+2 and isprime((p*q-1)//2) and isprime((p*q-1)//2+p+q):
                yield p
            p, q = q, nextprime(q)
    print(list(islice(agen(), 42))) # Michael S. Branicky, Apr 10 2022
Showing 1-1 of 1 results.