This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A261085 #23 Aug 18 2022 11:33:36 %S A261085 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 A261085 22,22,23,24,23,24,25,26,28,29,31,33,33,34,36,37,39,40,40,41,44,47,34, %U A261085 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 A261085 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 A261085 Antti Karttunen, <a href="/A261085/b261085.txt">Table of n, a(n) for n = 1..6543</a> %F A261085 a(n) = A155043(A000040(n)). %e A261085 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 A261085 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 A261085 mpr[p_]:=Length[NestWhileList[#-DivisorSigma[0,#]&,p,#>0&]]-1; mpr/@Prime[ Range[ 120]] (* _Harvey P. Dale_, Aug 18 2022 *) %o A261085 (PARI) %o A261085 uplim = 65537; %o A261085 v155043 = vector(uplim); %o A261085 v155043[1] = 1; v155043[2] = 1; %o A261085 for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]); %o A261085 A155043 = n -> if(!n,n,v155043[n]); %o A261085 n=0; forprime(p=2, uplim, n++; write("b261085.txt", n, " ", A155043(p))); %o A261085 (Scheme) (define (A261085 n) (A155043 (A000040 n))) %Y A261085 Cf. A000005, A000040, A049820, A155043, A259934, A261088. %Y A261085 Cf. A261086 (gives the positions of drops, i.e., where nonmonotonic) and A261087 (the corresponding primes). %K A261085 nonn %O A261085 1,2 %A A261085 _Antti Karttunen_, Sep 23 2015