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.

A381966 Row sums of A381965.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 20, 23, 26, 29, 32, 35, 40, 45, 50, 55, 30, 34, 38, 42, 48, 55, 62, 60, 70, 84, 40, 45, 50, 57, 66, 65, 78, 97, 86, 111, 50, 56, 62, 73, 74, 90, 86, 112, 98, 124, 60, 67, 76, 89, 96, 95, 128, 117
Offset: 0

Views

Author

Paolo Xausa, Mar 12 2025

Keywords

Crossrefs

Programs

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

Formula

a(n) = Sum_{k = 0..A031346(n)} A381965(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)).

A381963 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 digital sum of x (A007953).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19, 10, 1, 20, 2, 21, 3, 22, 4, 23, 5, 24, 6, 25, 7, 26, 8, 27, 9, 28, 10, 1, 29, 11, 2, 30, 3, 31, 4, 32, 5, 33, 6, 34, 7, 35, 8, 36, 9, 37, 10, 1, 38, 11, 2, 39, 12, 3
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,  1;
  11 | 11,  2;
  12 | 12,  3;
  13 | 13,  4;
  14 | 14,  5;
  15 | 15,  6;
  16 | 16,  7;
  17 | 17,  8;
  18 | 18,  9;
  19 | 19, 10,  1;
  20 | 20,  2;
  ...
		

Crossrefs

Cf. A007953, A010888 (right border), A031286 (row lengths - 1), A381964 (row sums).

Programs

  • Mathematica
    A381963row[n_] := NestWhileList[DigitSum, n, # >= 10 &];
    Array[A381963row, 40, 0]

Formula

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