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.

A058958 Numbers k such that 3^k + 4 is prime.

Original entry on oeis.org

0, 1, 2, 3, 6, 9, 10, 22, 30, 42, 57, 87, 174, 195, 198, 562, 994, 2421, 2487, 4629, 5838, 13698, 14730, 16966, 25851, 98634, 117222, 192819, 226038, 296115, 318465, 355902
Offset: 1

Views

Author

Robert G. Wilson v, Jan 13 2001

Keywords

Comments

Next term > 15000. The primes corresponding to 4629, ..., 14730 pass PARI's ispseudoprime() and the Rabin-Miller test for the first 100 prime bases. - Joerg Arndt, Jul 19 2012
Used PFGW (Fermat and Lucas, BLS) to determine (probable) primality of a(24)-a(26). - Robert Price, Jun 30 2013
a(27) > 10^5. - Robert Price, Jun 30 2013
a(29) > 2*10^5. - Robert Price, Dec 10 2013
a(31) > 3*10^5. - Tyler NeSmith, Dec 10 2020

Crossrefs

Cf. A102903 (corresponding primes).

Programs

  • Magma
    [n: n in [0..700] | IsPrime(3^n+4)]; // Vincenzo Librandi, Aug 25 2015
  • Mathematica
    Do[ If[ PrimeQ[3^n + 4], Print[n] ], {n, 0, 3000} ]
    Select[Range[0,3000],PrimeQ[3^#+4]&] (* Harvey P. Dale, Sep 07 2022 *)
  • PARI
    for(n=0,10^5,if(ispseudoprime(3^n+4),print1(n,", "))); /* Joerg Arndt, Jul 19 2012 */
    

Extensions

Terms 4629 ... 14730 from Joerg Arndt, Jul 19 2012
0 added by Bruno Berselli, Oct 04 2012
a(24)-a(26) from Robert Price, Jun 30 2013
a(27)-a(28) from Robert Price, Dec 10 2013
a(29)-a(30) from Tyler NeSmith, Dec 10 2020
a(31)-a(32) from Aurelien Gibier, Oct 02 2024