OFFSET
1,2
FORMULA
a(n) = b(n, 1, 0, 0) with b(n, i, j, f) = if i<n then b(n-i, i, i, 1-f-(1-2*f)*0^(i-j)) + b(n, i+1, j, f) else (1-f-(1-2*f)*0^(i-j))*0^(i-n). - Reinhard Zumkeller, Feb 19 2004
G.f.: F(x)*G(x)/2, where F(x) = 1-Product(1-2*x^i, i=1..infinity) and G(x) = 1/Product(1-x^i, i=1..infinity).
G.f. A(x) equals the off-diagonal entries in the 2 X 2 matrix Product_{n >= 1} [1, x^n/(1 - x^n); x^n/(1 - x^n), 1] = [B(x), A(x); A(x), B(x)], where B(x) is the g.f. of A092306. - Peter Bala, Feb 10 2021
EXAMPLE
n=6 has A000041(6)=11 partitions: 6, 5+1, 4+2, 4+1+1, 3+3, 3+2+1, 3+1+1+1, 2+2+2, 2+2+1+1, 2+1+1+1+1 and 1+1+1+1+1+1 with partition sets: {6}, {1,5}, {2,4}, {1,4}, {3}, {1,2,3}, {1,3}, {2}, {1,2}, {1,2} and {1}, five of them have an odd number of elements, therefore a(6)=5.
PROG
(Haskell)
import Data.List (group)
a090794 = length . filter odd . map (length . group) . ps 1 where
ps x 0 = [[]]
ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
-- Reinhard Zumkeller, Dec 19 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladeta Jovovic, Feb 12 2004
EXTENSIONS
More terms from Reinhard Zumkeller, Feb 17 2004
Definition simplified and shortened by Jonathan Sondow, Oct 13 2013
STATUS
approved