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 A384698 #23 Jun 15 2025 19:52:28 %S A384698 2,3,13,5,13,7,17,13,37,11,41,13,29,41,61,17,37,19,41,37,613,23,613, %T A384698 41,53,613,109,29,61,31,829,61,1861,61,73,37,277,73,157,41,613,43,89, %U A384698 613,181,47,97,613,101,97,401,53,109,101,113,109,229,59,829,61,241 %N A384698 The first prime number reached by iterating the map, x -> 2*x + 1 if x is even; x - lpf(x) otherwise where lpf(x) is the least prime factor of x, on n >= 2; or -1 if a prime is never reached. %C A384698 Conjecture: a(n) != -1. %F A384698 a(n) = n if n is a prime; > n otherwise. %F A384698 a(n) mod 4 = 1 unless n is a prime and n mod 4 = 3. %e A384698 a(4) = 13 because iterating the map on n = 4 reaches a prime, 13, in three steps: 4 -> 2*4+1=9 -> 9-3=6 -> 2*6+1=13. %o A384698 (Python) %o A384698 from sympy import isprime, primefactors %o A384698 for n in range (2, 63): %o A384698 while not isprime(n): n = n - min(primefactors(n)) if n%2 else 2*n + 1 %o A384698 print(n, end = ', ') %Y A384698 Cf. A020639 (lpf), A383777. %K A384698 nonn %O A384698 2,1 %A A384698 _Ya-Ping Lu_, Jun 09 2025