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.

A348296 Irregular table T(n, k), n > 0, k = 1..A000120(n), read by rows; the n-th contains, in ascending order, the distinct powers of 2 summing to n.

Original entry on oeis.org

1, 2, 1, 2, 4, 1, 4, 2, 4, 1, 2, 4, 8, 1, 8, 2, 8, 1, 2, 8, 4, 8, 1, 4, 8, 2, 4, 8, 1, 2, 4, 8, 16, 1, 16, 2, 16, 1, 2, 16, 4, 16, 1, 4, 16, 2, 4, 16, 1, 2, 4, 16, 8, 16, 1, 8, 16, 2, 8, 16, 1, 2, 8, 16, 4, 8, 16, 1, 4, 8, 16, 2, 4, 8, 16, 1, 2, 4, 8, 16, 32
Offset: 1

Views

Author

Rémy Sigrist, Jul 18 2022

Keywords

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ------------
   1  [1]
   2  [2]
   3  [1, 2]
   4  [4]
   5  [1, 4]
   6  [2, 4]
   7  [1, 2, 4]
   8  [8]
   9  [1, 8]
  10  [2, 8]
  11  [1, 2, 8]
  12  [4, 8]
  13  [1, 4, 8]
  14  [2, 4, 8]
  15  [1, 2, 4, 8]
		

Crossrefs

Programs

  • Mathematica
    Array[DeleteCases[Union@ NumberExpand[#, 2], 0] &, 32] // Flatten (* Michael De Vlieger, Jul 19 2022 *)
  • PARI
    row(n) = { my (r=vector(hammingweight(n))); for (k=1, #r, n -= r[k] = 2^valuation(n, 2)); return (r) }

Formula

T(n, k) = 2^A133457(n, k).
T(n, 1) = A006519(n).
T(n, A000120(n)) = A053644(n).
Sum_{k = 1..A000120(n)} T(n, k) = n.
Sum_{k = 1..A000120(n)} T(n, k) * (-1)^(k-1) = A065620(n).
Product_{k = 1..A000120(n)} T(n, k) = A059867(n).
T(2*n, k) = 2*T(n, k).