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.

A098845 Numbers k such that 4^k - 2^k - 1 is prime.

Original entry on oeis.org

2, 4, 5, 9, 10, 18, 38, 45, 50, 57, 108, 161, 208, 224, 225, 240, 354, 597, 634, 1008, 1080, 1468, 1525, 1560, 3298, 3329, 3846, 4129, 5430, 8616, 11834, 12988, 14610, 43401, 45306, 53776, 54449, 67497, 74025, 122449, 136845, 142896, 164541, 171157, 187668, 274054, 316944, 349296
Offset: 1

Views

Author

Pierre CAMI, Oct 10 2004; extended several times: Jun 01 2005, Jun 19 2006, May 03 2007

Keywords

Comments

All primes certified using PFGW from primeform group. - Pierre CAMI, Mar 07 2005
No terms 2, 3, 7, 12, 13 or 15 (mod 20) except 2. - Robert Israel, Dec 08 2015, updated by Fabrice Lavier, Jan 10 2019
Using such "Goldilocks" primes (a term coined by Mike Hamburg) as modulus facilitates use of Karatsuba multiplication in elliptic-curve cryptography. - Francois R. Grieu, Mar 25 2021

Crossrefs

Cf. similar sequences listed in A265481.

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(2^n*(2^n-1)-1)]; // Vincenzo Librandi, Dec 08 2015
    
  • Maple
    select(t -> isprime(4^t-2^t-1), [$1..1000]); # Robert Israel, Dec 08 2015
  • Mathematica
    Select[Range[15000], PrimeQ[4^# - 2^# - 1] &] (* Vincenzo Librandi, Dec 08 2015 *)
  • PARI
    for(n=1, 1e3, if(ispseudoprime(4^n-2^n-1), print1(n, ", "))) \\ Altug Alkan, Dec 08 2015
    
  • Python
    from sympy import isprime
    for n in range(1,1000):
        if isprime(4**n-2**n-1):
            print(n, end=', ') # Stefano Spezia, Jan 11 2019

Extensions

Extended to a(44) = 349296 (2^698592 - 2^349296 - 1 is a 210298-digit certified prime) by Pierre CAMI, Jan 11 2009
Definition simplified by Pierre CAMI, May 10 2012
a(30) corrected by Robert Israel, Dec 14 2015
4 missing terms between a(41) = 136845 and what is now a(46) = 274054 added by Fabrice Lavier, Jan 10 2019