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.

Showing 1-3 of 3 results.

A067991 a(n) = k such that the k-th triangular number is A068808(n).

Original entry on oeis.org

1, 2, 3, 7, 11, 12, 27, 31, 56, 107, 109, 132, 309, 343, 627, 968, 1332, 1891, 3129, 3434, 5291, 5656, 8831, 13332, 18972, 19492, 28248, 37067, 58309, 107516, 140547, 278172, 281743, 368507, 424256, 774325, 1247307, 2788547, 3126968, 3660565, 3949427, 7732916
Offset: 1

Views

Author

Francois Jooste (phukraut(AT)hotmail.com), Mar 10 2002

Keywords

Comments

a(n) = k such that A000217(k) = A068808(n). - Jon E. Schoenfield, Dec 30 2023

Examples

			a(8) = 31 because A068808(n) = 496 = 31*(31+1)/2 = A000217(31).
		

Crossrefs

Programs

  • Maple
    dig := X->convert((convert(X,base,10)),`+`); T := k->k*(k+1)/2; S := k->seq(dig(T(i)),i=1..k-1); seq(`if`(dig(T(i))>max(S(i)),i,printf("")),i=1..600);

Formula

a(n) = (sqrt(1 + 8*A068808(n)) - 1)/2. - Jon E. Schoenfield, Dec 30 2023

Extensions

Better name and more terms from Jon E. Schoenfield, Dec 30 2023

A062688 Smallest triangular number with digit sum n (or 0 if no such number exists).

Original entry on oeis.org

1, 0, 3, 0, 0, 6, 0, 0, 36, 28, 0, 66, 0, 0, 78, 0, 0, 378, 496, 0, 1596, 0, 0, 8385, 0, 0, 5778, 5995, 0, 8778, 0, 0, 47895, 0, 0, 67896, 58996, 0, 196878, 0, 0, 468996, 0, 0, 887778, 1788886, 0, 4896885, 0, 0, 5897895, 0, 0, 13999986, 15997996, 0, 38997696
Offset: 1

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Comments

From Jon E. Schoenfield, Dec 04 2021: (Start)
a(n) = 0 iff n == (2,4,5,7,8) mod 9.
Nonzero terms are not nondecreasing; e.g., a(9)=36 > a(10)=28.
(End)

Examples

			66 is the smallest triangular number with digit sum 12, so a(12)=66.
		

Crossrefs

Programs

  • Mathematica
    (With[{tbl={#,Total[IntegerDigits[#]]}&/@Accumulate[Range[9000]]},Table[SelectFirst[ tbl,#[[2]] ==n&],{n,60}]]/.Missing["NotFound"]->{0,0})[[;;,1]] (* Harvey P. Dale, Aug 21 2024 *)
  • PARI
    a(n) = if (vecsearch([2,4,5,7,8], n % 9), return (0)); my(k=1); while (sumdigits(k*(k+1)/2) != n, k++); k*(k+1)/2; \\ Michel Marcus, Dec 12 2021

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

Original entry on oeis.org

0, 1, 3, 6, 78, 686999778, 9876799878, 89996788896, 77779987999896, 589598998999878, 999699998689998991, 9988894989978899995, 95898999989999989765, 999999966989999986978996
Offset: 1

Views

Author

Jon E. Schoenfield, Dec 03 2021

Keywords

Comments

Subsequence of A068808.
No triangular number ends in 9, so the mean digit value is always less than 9.
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?
a(14) <= 999999966989999986978996. - David A. Corneth, Dec 05 2021

Examples

			   n                  a(n)  digit sum  #dgts  mean digit value
  --  --------------------  ---------  -----  ----------------
   1                     0          0      1  0
   2                     1          1      1  1
   3                     3          3      1  3
   4                     6          6      1  6
   5                    78         15      2  7.5
   6             686999778         69      9  7.66666666666...
   7            9876799878         78     10  7.8
   8           89996788896         87     11  7.90909090909...
   9        77779987999896        111     14  7.92857142857...
  10       589598998999878        120     15  8
  11    999699998689998991        145     18  8.05555555555...
  12   9988894989978899995        154     19  8.10526315789...
  13  95898999989999989765        163     20  8.15
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • Python
    def meandigval(n): s = str(n); return sum(map(int, s))/len(s)
    def afind(limit):
        alst, k, t, record = [], 0, 0, -1
        while t <= limit:
            mdv = meandigval(t)
            if mdv > record:
                print(t, end=", ")
                record = mdv
            k += 1
            t += k
    afind(10**14) # Michael S. Branicky, Dec 03 2021

Extensions

a(14) verified by Martin Ehrenstein, Dec 06 2021
Showing 1-3 of 3 results.