A309256 a(n) = n + 1 - Sum_{k=0..n} (Stirling2(n,k) mod 2).
0, 1, 1, 1, 2, 2, 2, 3, 5, 5, 4, 4, 6, 7, 7, 9, 12, 12, 10, 9, 11, 11, 10, 12, 16, 17, 15, 15, 18, 20, 20, 23, 27, 27, 24, 22, 24, 23, 21, 23, 28, 28, 24, 23, 27, 29, 28, 32, 38, 39, 35, 33, 36, 36, 34, 37, 43, 45, 42, 42, 46, 49, 49, 53, 58, 58, 54, 51, 53, 51, 48, 50, 56, 55, 49, 47, 52
Offset: 0
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
Table[n + 1 - Sum[Mod[StirlingS2[n, k], 2], {k, 0, n}], {n, 0, 76}] nmax = 76; CoefficientList[Series[x (2 - x)/(1 - x)^2 - x (1 + x) Product[(1 + x^(2^k) + x^(2^(k + 1))), {k, 0, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x]
-
PARI
a(n) = n + 1 - sum(k=0, n, stirling(n, k, 2) % 2); \\ Michel Marcus, Jul 19 2019
Formula
G.f.: x * (2 - x)/(1 - x)^2 - x * (1 + x) * Product_{k>=0} (1 + x^(2^k) + x^(2^(k+1))).
a(n) = n + 1 - A007306(n).
Comments