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 A375967 #11 Sep 08 2024 07:54:20 %S A375967 11,13,15,17,19,39,59,79,99,1001,20,21,22,23,24,25,26,27,28,102,30,31, %T A375967 32,33,34,35,36,37,38,1005,40,41,42,43,44,45,46,47,48,105,50,51,52,53, %U A375967 54,55,56,57,58,1009,60,61,62,63,64,65,66,67,68,108,70,71,72 %N A375967 a(n) is the least number > n with the same digit average as n. %C A375967 The digit average of a number n is its sum of digits divided by its number of digits: A007953(n) / A055642(n). %H A375967 Rémy Sigrist, <a href="/A375967/b375967.txt">Table of n, a(n) for n = 1..10000</a> %H A375967 Rémy Sigrist, <a href="/A375967/a375967.gp.txt">PARI program</a> %e A375967 The first terms, alongside the corresponding digit average, are: %e A375967 n a(n) Digit average %e A375967 -- ---- ------------- %e A375967 1 11 1 %e A375967 2 13 2 %e A375967 3 15 3 %e A375967 4 17 4 %e A375967 5 19 5 %e A375967 6 39 6 %e A375967 7 59 7 %e A375967 8 79 8 %e A375967 9 99 9 %e A375967 10 1001 1/2 %e A375967 11 20 1 %e A375967 12 21 3/2 %t A375967 a[n_]:=Module[{k=0}, While[k<=n || Mean[IntegerDigits[k]] != Mean[IntegerDigits[n]], k++]; k]; Array[a,63] (* _Stefano Spezia_, Sep 07 2024 *) %o A375967 (PARI) avg(n, base) = my (d = digits(n, base)); vecsum(d) / max(1, #d) %o A375967 a(n, base = 10) = { my (v = avg(n, base)); for (m = n+1, oo, if (avg(m, base)==v, return (m););); } %o A375967 (PARI) \\ See Links section. %Y A375967 Cf. A007953, A055642, A228915, A375968. %K A375967 nonn,base,easy %O A375967 1,1 %A A375967 _Rémy Sigrist_, Sep 04 2024