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.

A269835 Primes p of the form 2^k + 4*(-1)^k - 3.

Original entry on oeis.org

2, 5, 17, 257, 65537, 549755813881
Offset: 1

Views

Author

Jaroslav Krizek, Mar 06 2016

Keywords

Comments

a(7) has 216 digits (see b-file).
Fermat primes > 3 from A019434 are terms.
Corresponding values of k: 0, 2, 4, 8, 16, 39, 715, ....
Note that for k = 1, 2^k + 4*(-1)^k - 3 = -5.
For further k values, see A059609. (2^k-7 is divisible by 3 for even k.) - Jeppe Stig Nielsen, Nov 18 2019

Crossrefs

Programs

  • Magma
    [2] cat [2^k + 4*(-1)^k - 3: k in [2..300] | IsPrime(2^k + 4*(-1)^k - 3)];
    
  • Mathematica
    Select[Table[2^k+4(-1)^k-3,{k,0,50}],Positive[#]&&PrimeQ[#]&] (* Harvey P. Dale, Sep 14 2019 *)
  • PARI
    for (k=0,40,my(j=2^k+4*(-1)^k-3);if(isprime(j),print1(j,", "))) \\ Hugo Pfoertner, Nov 21 2019