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.

This page as a plain text file.
%I A046808 #36 Aug 16 2025 21:25:18
%S A046808 1,2,3,5,7,14,19,46,48,62,67,74,81,89,589,2090,2299,7742,1925975,
%T A046808 1989191,2008551,4371904,6487918
%N 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.
%C A046808 Previous name was: Recursive sequence of indices of Proth primes a*2^b + 1.
%H A046808 Chris K. Caldwell, The Prime Pages, <a href="https://primes.utm.edu/primes/page.php?id=133895">3871*2^1925976+1 (7742*2^1925975+1)</a>
%H A046808 Chris K. Caldwell, The Prime Pages, <a href="https://primes.utm.edu/primes/page.php?id=133914">1925975*2^1989191+1</a>
%H A046808 Chris K. Caldwell, The Prime Pages, <a href="https://primes.utm.edu/primes/page.php?id=137006">1989191*2^2008551+1</a>
%H A046808 Chris K. Caldwell, The Prime Pages, <a href="https://primes.utm.edu/primes/page.php?id=138814">2008551*2^4371904+1</a>
%H A046808 Chris K. Caldwell, The Prime Pages, <a href="https://primes.utm.edu/primes/page.php?id=140975">68311*2^6487924+1 (4371904*2^6487918+1)</a>
%H A046808 Y. Gallot, <a href="http://www.utm.edu/research/primes/programs/gallot/index.html">Proth.exe: Windows Program for Finding Large Primes</a>
%t A046808 t = {a = 1}; Do[If[PrimeQ[a*2^n + 1], AppendTo[t, a = n]], {n, 2, 2300}]; t (* _Jayanta Basu_, Jun 29 2013 *)
%o A046808 (PARI) a=1; until(, print1(a, ", "); for(b=a+1, +oo, if(ispseudoprime(a*2^b+1), a=b; break())))
%o A046808 (Python)
%o A046808 from gmpy2 import is_prime
%o A046808 from itertools import count, islice
%o A046808 def agen(): # generator of terms
%o A046808     an = 1
%o A046808     while True:
%o A046808         yield an
%o A046808         an = next(k for k in count(an+1) if is_prime(an*(1<<k) + 1))
%o A046808 print(list(islice(agen(), 18))) # _Michael S. Branicky_, Aug 12 2025
%Y A046808 Cf. A046809, A080076.
%K A046808 hard,nonn,more
%O A046808 1,2
%A A046808 Chad Davis (cad16(AT)po.cwru.edu)
%E A046808 a(19) from _Kellen Shenton_, May 08 2022
%E A046808 a(20) from _Kellen Shenton_, May 14 2022
%E A046808 a(21)-a(22) from _Kellen Shenton_, Feb 21 2025
%E A046808 New name, new offset and a(23) from _Kellen Shenton_, Aug 10 2025