OFFSET
1,3
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2000
PROG
(PARI) r=-1; forprime(p=2, 10^12, v=valuation(p-1, 2); if(v>r, print1(v, ", "); r=v));
(Python)
from itertools import count, islice
from sympy import isprime
def A370607_gen(): # generator of terms
a = 1
while True:
for q in count(a, a):
if isprime(q+1):
yield (b:=q&-q).bit_length()-1
a = b<<1
break
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt, Feb 23 2024
EXTENSIONS
a(21)-a(67) from Chai Wah Wu, Feb 23 2024
STATUS
approved