A066639 Number of partitions of n with floor(n/2) parts.
0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 10, 11, 14, 15, 21, 22, 29, 30, 41, 42, 55, 56, 76, 77, 100, 101, 134, 135, 175, 176, 230, 231, 296, 297, 384, 385, 489, 490, 626, 627, 791, 792, 1001, 1002, 1254, 1255, 1574, 1575, 1957, 1958, 2435, 2436, 3009, 3010, 3717, 3718, 4564
Offset: 1
Keywords
Examples
a(7)=4 as floor(7/2)=3 and the three-element partitions of 7 are (5, 1, 1), (4, 2, 1), (3, 3, 1), (3, 2, 2).
Programs
-
Maple
P := proc(n,k) option remember: if(k=1) then RETURN(1) elif(k<1 or n<1 or k>n) then RETURN(0) else RETURN(P(n-1,k-1)+P(n-k,k)) fi:end; seq(P(n,floor(n/2)),n=1..60); P := proc(n,k) option remember: if(k<1 or n<1 or k>n) then RETURN(0) elif(k=1) then RETURN(1) else RETURN(P(n-1,k-1)+P(n-k,k)) fi:end; seq(P(n,floor(n/2)),n=1..60);
-
PARI
a(n)=polcoeff(1/eta(x),ceil(n/2))-n%2
Formula
a(n)=A000041(ceiling(n/2))-1/2+(-1)^n/2 - Benoit Cloitre, Apr 28 2003
Extensions
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 18 2003 and Apr 21 2003