OFFSET
0,7
COMMENTS
Number of partitions of n into parts 1, 6, and 7. - Joerg Arndt, Oct 12 2014
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,0,-1,0,0,0,0,-1,1).
FORMULA
a(n) = (n^2 + 14*n + 7*(2+(n mod 6))*(6-(n mod 6)) -6*(n mod 7)*(7-(n mod 7)))/84. - Hoang Xuan Thanh, Aug 19 2025
MATHEMATICA
CoefficientList[Series[1/((1-x)(1-x^6)(1-x^7)), {x, 0, 60}], x] (* Harvey P. Dale, Dec 30 2021 *)
(* Alternative: *)
LinearRecurrence[{1, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 1}, {1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 4, 5}, 70] (* Harvey P. Dale, Dec 30 2021 *)
PROG
(PARI) a(n)=round((n^2+14*n+18)/84+369830\7^(n%7)%7/7) \\ Tani Akinari, Oct 13 2014
(PARI) a(n) = (n^2 + 14*n + 7*(2+n%6)*(6-n%6))\84 \\ Hoang Xuan Thanh, Aug 19 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
