OFFSET
0,5
COMMENTS
This sequence is similar to A175126: here we subtract the greatest prime factor, there the least prime factor.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 0..65537
FORMULA
a(n) <= n / A006530(n) for any n > 0.
a(n) = n if n <= 1, for n >= 2, a(n) = 1+a(A076563(n)). - Antti Karttunen, Aug 22 2019
EXAMPLE
For n = 16:
- the greatest prime factor of 16 is 2,
- the greatest prime factor of 16-2 = 14 is 7,
- the greatest prime factor of 14-7 = 7 is 7,
- 7 - 7 = 0,
- hence a(16) = 3.
PROG
(PARI) a(n) = for (k=0, oo, if (n==0, return (k), n==1, n--, my (f=factor(n)); n-=f[#f~, 1]))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Aug 21 2019
STATUS
approved