login
A309014
a(n) = Sum_{k=0..n} (-1)^(n-k) * (Stirling2(n,k) mod 2).
0
1, 1, 0, 1, 1, 2, 1, 1, 2, 3, 1, 2, 3, 3, 2, 1, 3, 4, 1, 3, 4, 5, 3, 2, 5, 5, 2, 3, 5, 4, 3, 1, 4, 5, 1, 4, 5, 7, 4, 3, 7, 8, 3, 5, 8, 7, 5, 2, 7, 7, 2, 5, 7, 8, 5, 3, 8, 7, 3, 4, 7, 5, 4, 1, 5, 6, 1, 5, 6, 9, 5, 4, 9, 11, 4, 7, 11, 10, 7, 3, 10, 11, 3, 8, 11, 13, 8, 5, 13, 12, 5
OFFSET
0,6
FORMULA
G.f.: 1 + x * (1 + x^3) * Product_{k>=1} (1 + x^(2^k) + x^(2^(k+1))).
a(0) = 1; a(2*k+1) = A002487(k+1); a(2*k+2) = A002487(k).
MATHEMATICA
Table[Sum[(-1)^(n - k) Mod[StirlingS2[n, k], 2], {k, 0, n}], {n, 0, 90}]
nmax = 90; CoefficientList[Series[1 + x (1 + x^3) Product[(1 + x^(2^k) + x^(2^(k + 1))), {k, 1, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x]
PROG
(PARI) a(n) = sum(k=0, n, (-1)^(n-k) * (stirling(n, k, 2) % 2)); \\ Michel Marcus, Jul 06 2019
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jul 06 2019
STATUS
approved