login
Number of partitions of n such that if k is the largest part, then k-2 occurs as a part.
4

%I #24 Apr 01 2017 21:08:40

%S 0,0,0,0,1,1,3,4,7,9,15,18,27,34,47,58,79,96,127,155,199,242,308,371,

%T 465,561,694,833,1024,1223,1491,1778,2150,2556,3076,3642,4359,5151,

%U 6133,7225,8570,10066,11892,13937,16401,19173,22495,26228,30676,35692,41620

%N Number of partitions of n such that if k is the largest part, then k-2 occurs as a part.

%C It appears that positive terms give column 3 of triangle A210945. - _Omar E. Pol_, May 18 2012

%H Alois P. Heinz, <a href="/A119907/b119907.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f. for number of partitions of n such that if k is the largest part, then k-m occurs as a part is Sum(x^(2*i-m)/Product(1-x^j, j=1..i), i=m+1..infinity).

%F It appears that a(n) = (A000041(n+2) - A000041(n+1)) - (A002620(n+2) - A002620(n+1)). - _Gionata Neri_, Apr 12 2015

%p b:= proc(n, i) option remember;

%p `if`(n=0 or i=1, 1, b(n, i-1)+`if`(i>n, 0, b(n-i, i)))

%p end:

%p a:= n-> add(b(n-(2*k-2), k), k=3..1+n/2):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, May 18 2012

%t b[n_, i_] := b[n, i] = If[n==0 || i==1, 1, b[n, i-1] + If[i>n, 0, b[n-i, i]]]; a[n_] := Sum[b[n-(2*k-2), k], {k, 3, 1+n/2}]; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Jul 01 2015, after _Alois P. Heinz_ *)

%Y Cf. A083751.

%K easy,nonn

%O 0,7

%A _Vladeta Jovovic_, Aug 02 2006

%E More terms from _Joshua Zucker_, Aug 14 2006