OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..6543
EXAMPLE
For n=4 we have prime(4) = 7, from which we start subtracting the number of divisors, to get the following path: 7 - 2 = 5, 5 - 2 = 3, 3 - 2 = 1, 1 - 1 = 0, and we have reached zero in four steps, thus a(4) = 4.
For n=5 we have prime(5) = 11, for which the similar process results: 11 - 2 = 9, 9 - 3 = 6, 6 - 4 = 2, 2 - 2 = 0, and again we have reached zero in four steps, thus also a(5) = 4.
MATHEMATICA
mpr[p_]:=Length[NestWhileList[#-DivisorSigma[0, #]&, p, #>0&]]-1; mpr/@Prime[ Range[ 120]] (* Harvey P. Dale, Aug 18 2022 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 23 2015
STATUS
approved