login
Number of partitions of n such that the number of different parts is odd.
7

%I #24 Feb 11 2021 23:02:03

%S 1,2,2,3,2,5,4,9,13,19,27,43,54,71,102,124,161,200,257,319,400,484,

%T 618,761,956,1164,1450,1806,2226,2741,3367,4137,5020,6163,7485,9042,

%U 10903,13172,15721,18956,22542,26925,31935,37962,44861,53183,62651

%N Number of partitions of n such that the number of different parts is odd.

%F 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

%F 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).

%F a(n) = (A000041(n)-A104575(n))/2.

%F 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

%e 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.

%o (Haskell)

%o import Data.List (group)

%o a090794 = length . filter odd . map (length . group) . ps 1 where

%o ps x 0 = [[]]

%o ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]

%o -- _Reinhard Zumkeller_, Dec 19 2013

%Y Cf. A060177, A002134, A000005, A027193, A090794.

%Y Cf. also A092314, A092322, A092269, A092309, A092321, A092313, A092310, A092311, A092268

%Y Cf. A092306.

%K nonn,easy

%O 1,2

%A _Vladeta Jovovic_, Feb 12 2004

%E More terms from _Reinhard Zumkeller_, Feb 17 2004

%E Definition simplified and shortened by _Jonathan Sondow_, Oct 13 2013