A117995 Number of partitions of n in which both smallest and largest part occur only once.
0, 0, 1, 1, 2, 3, 4, 6, 8, 11, 14, 20, 24, 33, 41, 54, 66, 87, 105, 136, 165, 209, 253, 319, 383, 477, 574, 707, 847, 1038, 1238, 1506, 1794, 2166, 2573, 3093, 3660, 4377, 5170, 6152, 7245, 8590, 10087, 11913, 13959, 16423, 19196, 22518, 26252, 30700, 35717
Offset: 1
Keywords
Examples
a(8)=6 because we have [7,1],[6,2],[5,3],[5,2,1],[4,3,1] and [3,2,2,1].
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000
Programs
-
Maple
g:=x^3/(1-x)/(1-x^2)+sum(x^(2*k)/product(1-x^j,j=1..k),k=3..70): gser:=series(g,x=0,60): seq(coeff(gser,x,n),n=1..55);
-
Mathematica
(* See A240077. - Clark Kimberling, Apr 01 2014 *) sl1Q[n_]:=With[{c=Split[n]},Length[c]>1&&Length[c[[1]]]==Length[c[[-1]]==1]]; Table[Count[IntegerPartitions[n],?(sl1Q)],{n,3,60}] (* _Harvey P. Dale, Apr 06 2025 *)
Formula
G.f.: Sum_{k>=2} Sum_{j=1..k-1} x^(j+k)/Product_{i=j+1..k-1} (1-x^i).
G.f.: x^3/[(1-x)(1-x^2)] + Sum_{k>=3} x^(2k)/Product_{j=1..k} (1-x^j).
a(n) = A002865(n) - (n + 1) mod 2. - Seiichi Manyama, Jan 28 2022
Comments