login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the number of iterations that n requires to reach 1 under the map n -> A346063(n).
0

%I #9 Jul 15 2022 04:07:23

%S 0,1,2,2,3,3,1,4,1,4,3,3,4,3,2,4,4,5,2,3,9,11,8,6,10,12,6,7,2,8,4,3,6,

%T 4,10,7,2,7,4,9,4,5,4,1,8,7,6,11,2,73,5,12,5,6,1,5,2,4,34,7,5,5,2,51,

%U 7,2,5,3,5,5,3,15,6,5,2,4,10

%N a(n) is the number of iterations that n requires to reach 1 under the map n -> A346063(n).

%C Conjecture: the sequence is infinite.

%o (Python)

%o from sympy import prime, isprime

%o for n in range(1, 78):

%o m = prime(n); ct = 0

%o while m > 2:

%o if isprime(m): m = m*m - 1; ct += 1

%o else: m //= 2

%o print(ct)

%o (PARI) f(x) = my(k=x^2-1); while(k>3 && !ispseudoprime(k), k\=2); k;

%o a(n) = my(c=0, x=prime(n)); while(x>2, c++; x=f(x)); c; \\ _Jinyuan Wang_, Jul 15 2022

%Y Cf. A339991, A340008, A340418, A340419, A346063.

%K nonn,more

%O 1,3

%A _Ya-Ping Lu_, Jul 05 2021

%E a(1) corrected by _Jinyuan Wang_, Jul 15 2022