OFFSET
1,4
COMMENTS
Each step is to any one of x+1 or x/p where p is a prime factor of x.
These steps are the game in A362416 and a(n) is the length of the shortest possible game starting at n.
a(n) = 1 iff n is a prime.
a(n) = 2 iff n is a semiprime or n+1 is a prime >= 5.
a(n) <= bigomega(n) since steps x/prime can divide out each prime successively (though often x+1 steps help make a shorter path to 1).
LINKS
Kevin Ryde, Table of n, a(n) for n = 1..10000
Kevin Ryde, PARI/GP Code
FORMULA
a(n) = Min_{i = n+1 or any n/prime} a(i), for n >= 2.
EXAMPLE
For n=80, steps 80 -> 40 -> 41 -> 1 (being /2, +1, /41) reach 1 after 3 steps and are the fewest possible so a(80) = 3.
PROG
(PARI) \\ See links.
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Kevin Ryde, May 30 2023
STATUS
approved