OFFSET
0,3
LINKS
EXAMPLE
+---+-----+---+----------+
| n | bin.|1's| a(n) |
+---+-----+---+----------+
| 0 | 0 | 0 | 0^0 = 1 |
| 1 | 1 | 1 | 1^1 = 1 |
| 2 | 10 | 1 | 2^1 = 2 |
| 3 | 11 | 2 | 3^2 = 9 |
| 4 | 100 | 1 | 4^1 = 4 |
| 5 | 101 | 2 | 5^2 = 25 |
| 6 | 110 | 2 | 6^2 = 36 |
+---+-----+---+----------+
bin. - n written in base 2;
1's - number of 1's in binary expansion of n.
MATHEMATICA
Table[SeriesCoefficient[Product[(1 + n x^(2^k)), {k, 0, n}], {x, 0, n}], {n, 0, 48}]
Join[{1}, Table[n^DigitCount[n, 2, 1], {n, 48}]]
PROG
(PARI) a(n) = n^hammingweight(n); \\ Altug Alkan, Apr 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 08 2018
STATUS
approved