OFFSET
1,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
Altug Alkan, Alternative scatterplot
MATHEMATICA
a[1] = 1; a[n_] := a[n] = 1 + a[n - FactorInteger[n - 1][[-1, 1]]]; Array[a, 97] (* Michael De Vlieger, Jun 26 2017 *)
PROG
(PARI) a006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
q=vector(100000); q[1]=1; for(n=2, #q, q[n]=q[n-a006530(n-1)]+1); q
(Python)
from sympy import primefactors
l=[0, 1, 2]
for n in range(3, 201): l.append(l[n - primefactors(n - 1)[-1]] + 1)
print(l[1:]) # Indranil Ghosh, Jun 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jun 23 2017
STATUS
approved