login
A384713
The number of steps that n requires to reach 1 under the map: x-> x^2 - 1 if x is an odd prime, x/2 if x is even, x - lpf(x) otherwise where lpf(x) is the least prime factor of x. a(n) = -1 if 1 is never reached.
2
0, 1, 4, 2, 8, 5, 9, 3, 6, 9, 11, 6, 12, 10, 7, 4, 12, 7, 14, 10, 8, 12, 14, 7, 11, 13, 8, 11, 15, 8, 14, 5, 9, 13, 9, 8, 16, 15, 9, 11, 16, 9, 17, 13, 10, 15, 17, 8, 10, 12, 9, 14, 18, 9, 13, 12, 10, 16, 17, 9, 19, 15, 10, 6, 10, 10, 20, 14, 11, 10, 18, 9, 20
OFFSET
1,3
COMMENTS
First 8 terms are the same as those in A339991.
Conjecture: a(n) != -1.
PROG
(Python)
from sympy import isprime, primefactors
def A384713(n, c = 0):
while n != 1: n = n//2 if n%2 == 0 else n*n-1 if isprime(n) else n-min(primefactors(n)); c += 1
return c
CROSSREFS
Cf. A339991.
Sequence in context: A030210 A367110 A339991 * A098798 A392859 A131783
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Jun 23 2025
STATUS
approved