OFFSET
3,2
LINKS
Winston de Greef, Table of n, a(n) for n = 3..10000
Index entries for linear recurrences with constant coefficients, signature (0,2,2,-1,-4,-1,2,2,0,-1).
FORMULA
For n >= 4, a(n) = -1 - floor((n-1)/2) + n * Sum_{k=1..floor(n/3)} floor((n-3*k+2)/2).
G.f.: -x^4 * (x^9-x^8-3*x^7+5*x^5+6*x^4-6*x^3-11*x^2-7*x-2) / ((x+1)^2 *(x^2+x+1)^2 *(x-1)^4). - Alois P. Heinz, Dec 13 2021
a(n) = 2*a(n-2)+2*a(n-3)-a(n-4)-4*a(n-5)-a(n-6)+2*a(n-7)+2*a(n-8)-a(n-10). - Wesley Ivan Hurt, Dec 17 2021
EXAMPLE
a(7) = 24; The partitions of 7 into 3 positive integer parts are (1,1,5), (1,2,4), (1,3,3) and (2,2,3). The sum of all the parts > 1 is then 5+2+4+3+3+2+2+3 = 24.
MATHEMATICA
CoefficientList[Series[-x*(x^9 - x^8 - 3*x^7 + 5*x^5 + 6*x^4 - 6*x^3 - 11*x^2 - 7*x - 2)/((x + 1)^2*(x^2 + x + 1)^2*(x - 1)^4), {x, 0, 50}], x] (* Wesley Ivan Hurt, Nov 12 2022 *)
PROG
(PARI) a(n)=if(n==3, 0, -1 - floor((n-1)/2) + n * sum(k=1, floor(n/3), floor((n-3*k+2)/2))) \\ Winston de Greef, Jan 28 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Dec 10 2021
STATUS
approved
