%I #23 Aug 18 2022 11:33:36
%S 1,2,3,4,4,5,6,7,8,10,11,13,14,15,15,17,19,20,22,23,24,26,16,18,20,21,
%T 22,22,23,24,23,24,25,26,28,29,31,33,33,34,36,37,39,40,40,41,44,47,34,
%U 35,49,51,52,54,54,55,57,58,59,58,59,62,48,49,50,66,69,71,73,74,74,76,55,57,59,60,61,63,63,65,68,69,71,72,74,62,64,65,66,67,67,70,72,73,75,76,77,80,81,75,77,79,79,81
%N Number of steps needed to reach zero when starting from the n-th prime [i.e., setting k to A000040(n)] and repeatedly applying the map that replaces k with k - d(k), where d(k) is the number of divisors of k (A000005).
%H Antti Karttunen, <a href="/A261085/b261085.txt">Table of n, a(n) for n = 1..6543</a>
%F a(n) = A155043(A000040(n)).
%e 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.
%e 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.
%t mpr[p_]:=Length[NestWhileList[#-DivisorSigma[0,#]&,p,#>0&]]-1; mpr/@Prime[ Range[ 120]] (* _Harvey P. Dale_, Aug 18 2022 *)
%o (PARI)
%o uplim = 65537;
%o v155043 = vector(uplim);
%o v155043[1] = 1; v155043[2] = 1;
%o for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]);
%o A155043 = n -> if(!n,n,v155043[n]);
%o n=0; forprime(p=2, uplim, n++; write("b261085.txt", n, " ", A155043(p)));
%o (Scheme) (define (A261085 n) (A155043 (A000040 n)))
%Y Cf. A000005, A000040, A049820, A155043, A259934, A261088.
%Y Cf. A261086 (gives the positions of drops, i.e., where nonmonotonic) and A261087 (the corresponding primes).
%K nonn
%O 1,2
%A _Antti Karttunen_, Sep 23 2015