OFFSET
0,4
COMMENTS
Number of even entries in n-th row of triangle of Stirling numbers of the first kind (A048994).
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: 1/(1 - x)^2 - (1 + x) * Product_{k>=0} (1 + 2*x^(2^(k+1))).
a(n) = n + 1 - 2^A000120(floor(n/2)).
MATHEMATICA
Table[n + 1 - Sum[Mod[StirlingS1[n, k], 2], {k, 0, n}], {n, 0, 76}]
nmax = 76; CoefficientList[Series[1/(1 - x)^2 - (1 + x) Product[(1 + 2 x^(2^(k + 1))), {k, 0, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x]
PROG
(PARI) a(n) = n + 1 - sum(k=0, n, stirling(n, k, 1) % 2); \\ Michel Marcus, Jul 19 2019
(PARI) a(n) = n + 1 - 2^hammingweight(n\2); \\ Amiram Eldar, Jul 25 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jul 19 2019
STATUS
approved