A182978 Total number of parts that are the smallest part or the largest part in all partitions of n.
1, 3, 6, 12, 20, 34, 52, 80, 116, 170, 236, 333, 453, 621, 825, 1111, 1455, 1923, 2487, 3239, 4149, 5342, 6770, 8625, 10852, 13698, 17107, 21413, 26567, 33019, 40721, 50270, 61663, 75665, 92318, 112686, 136849, 166173, 200923, 242836
Offset: 1
Keywords
Examples
For n = 6 the partitions of 6 are 6 5 + 1 4 + 2 4 + 1 + 1 3 + 3 3 + (2) + 1 .... the "2" is the part that does not count. 3 + 1 + 1 + 1 2 + 2 + 2 2 + 2 + 1 + 1 2 + 1 + 1 + 1 + 1 1 + 1 + 1 + 1 + 1 + 1 The total number of parts in all partitions of 6 is equal to 35. All parts are the smallest part or the largest part, except the "2" in the partition (3 + 2 + 1), so a(6) = 35 - 1 = 34.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..1000
Programs
-
Maple
l:= proc(n, i) option remember; `if`(n=i, n, 0)+ `if`(i<1, 0, l(n, i-1) +`if`(n l(n, n) +s(n, n) -numtheory[sigma](n): seq(a(n), n=1..50); # Alois P. Heinz, Jan 17 2013
-
Mathematica
l[n_, i_] := l[n, i] = If[n==i, n, 0] + If[i<1, 0, l[n, i-1] + If[nJean-François Alcover, Nov 03 2015, after Alois P. Heinz *)
Extensions
a(12) corrected and more terms a(13)-a(40) from David Scambler, Jul 18 2011