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 A338920 #40 Nov 26 2020 23:41:39 %S A338920 0,0,0,0,0,0,0,0,0,0,11,6,4,3,3,2,2,2,2,0,21,11,7,6,5,4,3,3,3,0,31,16, %T A338920 11,8,7,6,5,4,4,0,41,21,14,11,9,7,6,6,5,0,51,26,17,13,11,9,8,7,6,0,61, %U A338920 31,21,16,13,11,9,8,7,0,71,36,24,18,15,12,11,9 %N A338920 a(n) is the number of times it takes to iteratively subtract m from n where m is the largest nonzero proper suffix of n less than or equal to the remainder until no further subtraction is possible. %C A338920 Subtraction terminates when the remainder is less than the smallest nonzero proper suffix of n. A suffix of n is n mod 10^k for some k and a proper suffix is one that is strictly less than n. Equivalently, a proper suffix of n is the decimal value of the digits of n with one or more leading digits removed. %e A338920 a(131) = 11 since 131-31-31-31-31-1-1-1-1-1-1-1 = 0 has 11 subtractions; %e A338920 a(132) = 6 since 132-32-32-32-32-2-2 = 0 has 6 subtractions; %e A338920 a(133) = 4 since 133-33-33-33-33 = 1 has 4 subtractions. %t A338920 count = 1000; SubCount = {}; %t A338920 Do[(n = m = k; c = 0; %t A338920 While[n > 0, %t A338920 If[n <= m, m = ToExpression[StringDrop[ToString[k], 1]], m]; %t A338920 If[m == Null || m == 0, Break[]]; n -= m; %t A338920 If[n < 0, Break[]]; c++; %t A338920 ]; AppendTo[SubCount, c];), {k, 1, count, 1}]; %t A338920 ListPlot[SubCount] %t A338920 Print[SubCount]; %o A338920 (PARI) a(n)={my(m=n%(10^logint(n,10)), s=0); while(m>0, s+=n\m; n%=m; m%=10^logint(m,10)); s} \\ _Andrew Howroyd_, Nov 21 2020 %Y A338920 Cf. A217657. %K A338920 nonn,base %O A338920 1,11 %A A338920 _Linus Jarbo_ and _Hugo Angulo_, Nov 15 2020