login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A240138 Number of partitions of n into distinct parts, where the difference between the number of odd parts and the number of even parts is 2. 2
1, 0, 1, 0, 2, 0, 2, 1, 3, 2, 3, 4, 4, 7, 4, 11, 5, 16, 6, 23, 8, 31, 11, 41, 16, 53, 24, 67, 35, 83, 52, 102, 74, 124, 106, 149, 146, 179, 201, 214, 268, 256, 357, 307, 463, 370, 599, 447, 759, 545, 959, 667, 1192, 822, 1477, 1017, 1806, 1265, 2203, 1575 (list; graph; refs; listen; history; text; internal format)
OFFSET

4,5

COMMENTS

With offset 6 number of partitions of n into distinct parts, where the difference between the number of odd parts and the number of even parts is -2.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 4..1000

FORMULA

a(n) = [x^n y^2] Product_{i>=1} 1+x^i*y^(2*(i mod 2)-1).

EXAMPLE

a(16) = 4: [15,1], [13,3], [11,5], [9,7].

a(17) = 7: [11,3,2,1], [9,5,2,1], [9,4,3,1], [8,5,3,1], [7,6,3,1], [7,5,4,1], [7,5,3,2].

MAPLE

b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2 or

      abs(t)>n, 0, `if`(n=0, 1, b(n, i-1, t)+

      `if`(i>n, 0, b(n-i, i-1, t+(2*irem(i, 2)-1)))))

    end:

a:= n-> b(n$2, -2):

seq(a(n), n=4..80);

CROSSREFS

Column k=2 of A240021.

Sequence in context: A070102 A029182 A035373 * A261387 A197317 A035573

Adjacent sequences:  A240135 A240136 A240137 * A240139 A240140 A240141

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Apr 02 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 15 13:56 EST 2019. Contains 329149 sequences. (Running on oeis4.)