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.

A297306 Primes p such that q = 4*p+1 and r = (2*p+1)/3 are also primes.

Original entry on oeis.org

7, 43, 79, 163, 673, 853, 919, 1063, 1429, 1549, 1663, 2143, 2683, 3229, 3499, 4993, 5119, 5653, 5779, 6229, 6343, 7333, 7459, 7669, 8353, 8539, 8719, 9829, 10009, 10243, 10303, 11383, 11689, 12583, 13399, 14149, 14653, 14923, 15649, 16603, 17053, 17389, 17749
Offset: 1

Views

Author

David S. Newman, Jan 04 2018

Keywords

Comments

This sequence was suggested by Moshe Shmuel Newman. It has its source in his study of finite groups.

Examples

			Prime p = 7 is in the sequence because q = 4*7+1 = 29 and r = (2*7+1)/3 = 5 are also primes.
		

Crossrefs

Cf. A000040.
Intersection of A023212 and A104163.

Programs

  • Maple
    a:= proc(n) option remember; local p; p:= `if`(n=1, 1, a(n-1));
          do p:= nextprime(p); if irem(p, 3)=1 and
             isprime(4*p+1) and isprime((2*p+1)/3) then break fi
          od; p
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Jan 07 2018
  • Mathematica
    a[n_] := a[n] = Module[{p}, p = If[n == 1, 1, a[n-1]]; While[True, p = NextPrime[p]; If[Mod[p, 3] == 1 && PrimeQ[4p+1] && PrimeQ[(2p+1)/3], Break[]]]; p];
    Array[a, 50] (* Jean-François Alcover, Nov 27 2020, after Alois P. Heinz *)
  • PARI
    isok(p) = isprime(p) && isprime(4*p+1) && iferr(isprime((2*p+1)/3), E, 0); \\ Michel Marcus, Nov 27 2020

Extensions

More terms from Alois P. Heinz, Jan 07 2018