OFFSET
1,3
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..10^6.
EXAMPLE
a(11) = 10 because a(10) = 9, and no prior term has greater sum of decimal digits. Likewise a(17) = 16, a(24) = 23, a(33) = 32. But a(40) = 37 because 2 prior terms have greater digit sums than a(39).
MATHEMATICA
c[_] := 0; a[1] = j = s = 1; nn = 120;
Do[k = DigitSum[j]; c[k]++;
k = Total@ Array[c, k];
Set[{a[n], j}, {k, k}],
{n, 2, nn}];
Array[a, nn] (* Michael De Vlieger, Dec 07 2024 *)
CROSSREFS
KEYWORD
nonn,base,easy,new
AUTHOR
David James Sycamore, Dec 07 2024
STATUS
approved