OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10870 (rows n = 1..2000, flattened)
FORMULA
EXAMPLE
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]
MATHEMATICA
Array[DeleteCases[Union@ NumberExpand[#, 2], 0] &, 32] // Flatten (* Michael De Vlieger, Jul 19 2022 *)
PROG
(PARI) row(n) = { my (r=vector(hammingweight(n))); for (k=1, #r, n -= r[k] = 2^valuation(n, 2)); return (r) }
CROSSREFS
KEYWORD
nonn,tabf,base,easy
AUTHOR
Rémy Sigrist, Jul 18 2022
STATUS
approved