This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A182978 #15 Nov 03 2015 03:18:57 %S A182978 1,3,6,12,20,34,52,80,116,170,236,333,453,621,825,1111,1455,1923,2487, %T A182978 3239,4149,5342,6770,8625,10852,13698,17107,21413,26567,33019,40721, %U A182978 50270,61663,75665,92318,112686,136849,166173,200923,242836 %N A182978 Total number of parts that are the smallest part or the largest part in all partitions of n. %H A182978 Alois P. Heinz, <a href="/A182978/b182978.txt">Table of n, a(n) for n = 1..1000</a> %F A182978 a(n) = A006128(n) - A182977(n). %e A182978 For n = 6 the partitions of 6 are %e A182978 6 %e A182978 5 + 1 %e A182978 4 + 2 %e A182978 4 + 1 + 1 %e A182978 3 + 3 %e A182978 3 + (2) + 1 .... the "2" is the part that does not count. %e A182978 3 + 1 + 1 + 1 %e A182978 2 + 2 + 2 %e A182978 2 + 2 + 1 + 1 %e A182978 2 + 1 + 1 + 1 + 1 %e A182978 1 + 1 + 1 + 1 + 1 + 1 %e A182978 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. %p A182978 l:= proc(n, i) option remember; `if`(n=i, n, 0)+ %p A182978 `if`(i<1, 0, l(n, i-1) +`if`(n<i, 0, l(n-i, i))) %p A182978 end: %p A182978 s:= proc(n, i) option remember; `if`(n=0 or i=1, n, %p A182978 `if`(irem(n, i, 'r')=0, r, 0)+add(s(n-i*j, i-1), j=0..n/i)) %p A182978 end: %p A182978 a:= n-> l(n, n) +s(n, n) -numtheory[sigma](n): %p A182978 seq(a(n), n=1..50); # _Alois P. Heinz_, Jan 17 2013 %t A182978 l[n_, i_] := l[n, i] = If[n==i, n, 0] + If[i<1, 0, l[n, i-1] + If[n<i, 0, l[n-i, i]]]; s[n_, i_] := s[n, i] = If[n==0 || i==1, n, {q, r} = QuotientRemainder[n, i]; If[r==0, q, 0] + Sum[s[n-i*j, i-1], {j, 0, n/i}] ]; a[n_] := l[n, n] + s[n, n] - DivisorSigma[1, n]; Table[a[n], {n, 1, 50}] (* _Jean-François Alcover_, Nov 03 2015, after _Alois P. Heinz_ *) %Y A182978 Cf. A006128, A046746, A092269, A116686, A182977, A182984. %K A182978 nonn %O A182978 1,2 %A A182978 _Omar E. Pol_, Jul 17 2011 %E A182978 a(12) corrected and more terms a(13)-a(40) from _David Scambler_, Jul 18 2011