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.

A046808 a(n) is the least integer greater than a(n-1) such that a(n-1)*2^a(n) + 1 is prime, a(1) = 1.

Original entry on oeis.org

1, 2, 3, 5, 7, 14, 19, 46, 48, 62, 67, 74, 81, 89, 589, 2090, 2299, 7742, 1925975, 1989191, 2008551, 4371904, 6487918
Offset: 1

Views

Author

Chad Davis (cad16(AT)po.cwru.edu)

Keywords

Comments

Previous name was: Recursive sequence of indices of Proth primes a*2^b + 1.

Crossrefs

Programs

  • Mathematica
    t = {a = 1}; Do[If[PrimeQ[a*2^n + 1], AppendTo[t, a = n]], {n, 2, 2300}]; t (* Jayanta Basu, Jun 29 2013 *)
  • PARI
    a=1; until(, print1(a, ", "); for(b=a+1, +oo, if(ispseudoprime(a*2^b+1), a=b; break())))
    
  • Python
    from gmpy2 import is_prime
    from itertools import count, islice
    def agen(): # generator of terms
        an = 1
        while True:
            yield an
            an = next(k for k in count(an+1) if is_prime(an*(1<Michael S. Branicky, Aug 12 2025

Extensions

a(19) from Kellen Shenton, May 08 2022
a(20) from Kellen Shenton, May 14 2022
a(21)-a(22) from Kellen Shenton, Feb 21 2025
New name, new offset and a(23) from Kellen Shenton, Aug 10 2025