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.
%I A384713 #15 Jul 04 2025 01:11:21 %S A384713 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, %T A384713 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, %U A384713 13,12,10,16,17,9,19,15,10,6,10,10,20,14,11,10,18,9,20 %N 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. %C A384713 First 8 terms are the same as those in A339991. %C A384713 Conjecture: a(n) != -1. %H A384713 Ya-Ping Lu, <a href="/A384713/b384713.txt">Table of n, a(n) for n = 1..10000</a> %o A384713 (Python) %o A384713 from sympy import isprime, primefactors %o A384713 def A384713(n, c = 0): %o A384713 while n != 1: n = n//2 if n%2 == 0 else n*n-1 if isprime(n) else n-min(primefactors(n)); c += 1 %o A384713 return c %Y A384713 Cf. A339991. %K A384713 nonn %O A384713 1,3 %A A384713 _Ya-Ping Lu_, Jun 23 2025