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.

A355188 Primes p such that (2^p+p^2)/3 is prime.

Original entry on oeis.org

5, 7, 17, 43, 61, 73, 241, 739, 1297, 4211, 98519
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 23 2022

Keywords

Comments

Intersection with A242929 (primes p such that 2^p-p^2 is prime) includes 5, 7 and 17. Any others?
a(12) > 4*10^5. - Michael S. Branicky, Oct 31 2024

Examples

			a(3) = 17 is a term because (2^17+17^2)/3 = 43787 is prime.
		

Crossrefs

Cf. A242929.

Programs

  • Maple
    filter:= proc(p) isprime(p) and isprime((2^p+p^2)/3) end proc:
    select(filter, [seq(i,i=5..10000,2)]);
  • Mathematica
    Select[Prime[Range[600]], PrimeQ[(2^# + #^2)/3] &] (* Amiram Eldar, Jun 23 2022 *)
  • PARI
    isok(p) = if (isprime(p), my(q=(2^p+p^2)/3); (denominator(q)==1) && ispseudoprime(q)); \\ Michel Marcus, Jun 23 2022
    
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen():
        p = 2
        while True:
            t = 2**p+p**2
            if t%3 == 0 and isprime(t//3):
                yield p
            p = nextprime(p)
    print(list(islice(agen(), 10))) # Michael S. Branicky, Jun 23 2022

Extensions

a(11) from Daniel Suteu, Jun 25 2022
Showing 1-1 of 1 results.