cp's OEIS Frontend

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.

A384874 a(n) is the first prime encountered when iterating the map x -> x/2 if x is even, x*lpf(x) + 1 otherwise, where lpf(x) is the least prime factor of x, on n >= 2; or -1 if a prime is never reached.

This page as a plain text file.
%I A384874 #12 Jun 21 2025 22:15:34
%S A384874 2,3,2,5,3,7,2,7,5,11,3,13,7,23,2,17,7,19,5,2,11,23,3,313,13,41,7,29,
%T A384874 23,31,2,313,17,11,7,37,19,59,5,41,2,43,11,17,23,47,3,43,313,5869,13,
%U A384874 53,41,13,7,43,29,59,23,61,31,313,2,163,313,67,17,13,11
%N A384874 a(n) is the first prime encountered when iterating the map x -> x/2 if x is even, x*lpf(x) + 1 otherwise, where lpf(x) is the least prime factor of x, on n >= 2; or -1 if a prime is never reached.
%C A384874 Conjecture: a(n) != -1.
%C A384874 For n <= 24, this sequence is the same as A320028.
%H A384874 Ya-Ping Lu, <a href="/A384874/b384874.txt">Table of n, a(n) for n = 2..1000</a>
%H A384874 Ya-Ping Lu, <a href="/A384874/a384874.pdf">A plot of a(n) for n <= 1000</a>
%o A384874 (Python)
%o A384874 from sympy import isprime, primefactors
%o A384874 def A384874(n):
%o A384874     while not isprime(n): n = n*min(primefactors(n))+1 if n%2 else n//2
%o A384874     return n
%Y A384874 Cf. A006370, A320028, A384698.
%K A384874 nonn
%O A384874 2,1
%A A384874 _Ya-Ping Lu_, Jun 11 2025