cp's OEIS Frontend

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.

A349875 Triangular numbers whose mean digit value reaches a new maximum.

This page as a plain text file.
%I A349875 #20 Dec 08 2021 19:58:32
%S A349875 0,1,3,6,78,686999778,9876799878,89996788896,77779987999896,
%T A349875 589598998999878,999699998689998991,9988894989978899995,
%U A349875 95898999989999989765,999999966989999986978996
%N A349875 Triangular numbers whose mean digit value reaches a new maximum.
%C A349875 Subsequence of A068808.
%C A349875 No triangular number ends in 9, so the mean digit value is always less than 9.
%C A349875 Is this sequence finite? Or does the mean digit value approach some upper limit arbitrarily closely without ever reaching it exactly, and, if so, what is that limit?
%C A349875 a(14) <= 999999966989999986978996. - _David A. Corneth_, Dec 05 2021
%e A349875    n                  a(n)  digit sum  #dgts  mean digit value
%e A349875   --  --------------------  ---------  -----  ----------------
%e A349875    1                     0          0      1  0
%e A349875    2                     1          1      1  1
%e A349875    3                     3          3      1  3
%e A349875    4                     6          6      1  6
%e A349875    5                    78         15      2  7.5
%e A349875    6             686999778         69      9  7.66666666666...
%e A349875    7            9876799878         78     10  7.8
%e A349875    8           89996788896         87     11  7.90909090909...
%e A349875    9        77779987999896        111     14  7.92857142857...
%e A349875   10       589598998999878        120     15  8
%e A349875   11    999699998689998991        145     18  8.05555555555...
%e A349875   12   9988894989978899995        154     19  8.10526315789...
%e A349875   13  95898999989999989765        163     20  8.15
%t A349875 seq = {}; max = -1; Do[If[(m = Mean @ IntegerDigits[(t = n*(n + 1)/2)]) > max, max = m; AppendTo[seq, t]], {n, 0, 10^6}]; seq (* _Amiram Eldar_, Dec 03 2021 *)
%o A349875 (Python)
%o A349875 def meandigval(n): s = str(n); return sum(map(int, s))/len(s)
%o A349875 def afind(limit):
%o A349875     alst, k, t, record = [], 0, 0, -1
%o A349875     while t <= limit:
%o A349875         mdv = meandigval(t)
%o A349875         if mdv > record:
%o A349875             print(t, end=", ")
%o A349875             record = mdv
%o A349875         k += 1
%o A349875         t += k
%o A349875 afind(10**14) # _Michael S. Branicky_, Dec 03 2021
%Y A349875 Cf. A000217, A068133, A068808, A069669, A069670, A095864.
%K A349875 nonn,base,hard,more
%O A349875 1,3
%A A349875 _Jon E. Schoenfield_, Dec 03 2021
%E A349875 a(14) verified by _Martin Ehrenstein_, Dec 06 2021