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.

A381964 Row sums of A381963.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 30, 22, 24, 26, 28, 30, 32, 34, 36, 39, 42, 33, 35, 37, 39, 41, 43, 45, 48, 51, 54, 44, 46, 48, 50, 52, 54, 57, 60, 63, 66, 55, 57, 59, 61, 63, 66, 69, 72, 75, 78, 66, 68, 70, 72, 75, 78, 81, 84, 87, 90
Offset: 0

Views

Author

Paolo Xausa, Mar 11 2025

Keywords

Crossrefs

Programs

  • Mathematica
    A381964[n_] := Total[NestWhileList[DigitSum, n, # >= 10 &]];
    Array[A381964, 100, 0]

Formula

a(n) = Sum_{k = 0..A031286(n)} A381963(n,k).

A381962 Irregular triangle read by rows, where row n lists the iterates of f(x), starting at x = n until f(x) <= 1, where f(x) is the Hamming weight of x (A000120).

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 1, 4, 1, 5, 2, 1, 6, 2, 1, 7, 3, 2, 1, 8, 1, 9, 2, 1, 10, 2, 1, 11, 3, 2, 1, 12, 2, 1, 13, 3, 2, 1, 14, 3, 2, 1, 15, 4, 1, 16, 1, 17, 2, 1, 18, 2, 1, 19, 3, 2, 1, 20, 2, 1, 21, 3, 2, 1, 22, 3, 2, 1, 23, 4, 1, 24, 2, 1, 25, 3, 2, 1, 26, 3, 2, 1
Offset: 0

Views

Author

Paolo Xausa, Mar 11 2025

Keywords

Examples

			Triangle begins:
  n\k|  0  1  2  3
  ----------------
   0 |  0;
   1 |  1;
   2 |  2, 1;
   3 |  3, 2, 1;
   4 |  4, 1;
   5 |  5, 2, 1;
   6 |  6, 2, 1;
   7 |  7, 3, 2, 1;
   8 |  8, 1;
   9 |  9, 2, 1;
  10 | 10, 2, 1;
  ...
		

Crossrefs

Cf. A000120, A078627 (row lengths), A078677 (row sums), A180094.

Programs

  • Mathematica
    A381962row[n_] := NestWhileList[DigitSum[#, 2] &, n, # > 1 &];
    Array[A381962row, 30, 0]
  • Python
    def row(n):
        out = [n] if n > 1 else []
        while (n:=n.bit_count()) > 1:
            out += [n]
        return out + [n]
    print([e for n in range(27) for e in row(n)]) # Michael S. Branicky, Mar 12 2025

Formula

T(n,0) = n and, for k = 1..A180094(n), T(n,k) = A000120(T(n,k-1)).

A381965 Irregular triangle read by rows, where row n lists the iterates of f(x), starting at x = n until f(x) < 10, where f(x) is the multiplicative digital root of x (A031347).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 11, 1, 12, 2, 13, 3, 14, 4, 15, 5, 16, 6, 17, 7, 18, 8, 19, 9, 20, 0, 21, 2, 22, 4, 23, 6, 24, 8, 25, 10, 0, 26, 12, 2, 27, 14, 4, 28, 16, 6, 29, 18, 8, 30, 0, 31, 3, 32, 6, 33, 9, 34, 12, 2, 35, 15, 5, 36, 18, 8, 37, 21, 2
Offset: 0

Views

Author

Paolo Xausa, Mar 11 2025

Keywords

Examples

			Triangle begins:
  n\k|  0   1   2
  ---------------
   0 |  0;
   1 |  1;
   2 |  2;
   3 |  3;
   4 |  4;
   5 |  5;
   6 |  6;
   7 |  7;
   8 |  8;
   9 |  9;
  10 | 10,  0;
  11 | 11,  1;
  12 | 12,  2;
  13 | 13,  3;
  14 | 14,  4;
  15 | 15,  5;
  16 | 16,  6;
  17 | 17,  7;
  18 | 18,  8;
  19 | 19,  9;
  20 | 20,  0;
  21 | 21,  2;
  22 | 22,  4;
  23 | 23,  6;
  24 | 24,  8;
  25 | 25, 10,  0;
  ...
		

Crossrefs

Cf. A031346 (row lengths - 1), A031347 (right border), A381966 (row sums).

Programs

  • Mathematica
    A381965row[n_] := NestWhileList[Times @@ IntegerDigits[#] &, n, # >= 10 &];
    Array[A381965row, 50, 0]

Formula

T(n,0) = n and, for k = 1..A031346(n), T(n,k) = A031347(T(n,k-1)).
Showing 1-3 of 3 results.