OFFSET
1,3
COMMENTS
Conjecture: the sequence is infinite.
PROG
(Python)
from sympy import prime, isprime
for n in range(1, 78):
m = prime(n); ct = 0
while m > 2:
if isprime(m): m = m*m - 1; ct += 1
else: m //= 2
print(ct)
(PARI) f(x) = my(k=x^2-1); while(k>3 && !ispseudoprime(k), k\=2); k;
a(n) = my(c=0, x=prime(n)); while(x>2, c++; x=f(x)); c; \\ Jinyuan Wang, Jul 15 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Ya-Ping Lu, Jul 05 2021
EXTENSIONS
a(1) corrected by Jinyuan Wang, Jul 15 2022
STATUS
approved