A323135 a(n) is the least number of iterations that n requires to reach a power of a prime under the map x -> A070229(x), or -1 if we never reach a power of a prime.
0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 3, 0, 5, 2, 0, 0, 5, 0, 1, 4, 9, 0, 1, 0, 11, 0, 3, 0, 3, 0, 0, 8, 15, 2, 11, 0, 17, 10, 9, 0, 1, 0, 7, 8, 21, 0, 15, 0, 7, 14, 9, 0, 17, 6, 7, 16, 27, 0, 9, 0, 29, 6, 0, 8, 5, 0, 13, 20, 5, 0, 15, 0, 35, 14, 15, 4, 7, 0, 13, 0
Offset: 1
Examples
For n = 12: - 12 = 2^2 * 3, - A070229(12) = 12 + 3 = 15 = 3 * 5, - A070229(15) = 15 + 5 = 20 = 2^2 * 5, - A070229(20) = 20 + 5 = 25 = 5^5, - hence we need at least 3 iterations of A070229 to reach a power of a prime, - and a(12) = 3.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
Programs
-
PARI
a(n) = for (k=0, oo, if (omega(n) <= 1, return (k), my (f=factor(n)); n += f[#f~, 1]))
Formula
a(n) = 0 iff n belongs to A000961.
Comments