OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Project Euler, Problem 577. Counting hexagons.
Index entries for linear recurrences with constant coefficients, signature (3,-3,3,-6,6,-3,3,-3,1).
FORMULA
a(n) = (1/216)*((208 + 270*n + 111*n^2 + 18*n^3 + n^4) - 8*(-1)^n*(A099254(n) + A099254(n-1)) + 16*(A049347(n) + 2*A049347(n-1)) ). - G. C. Greubel, Oct 22 2024
MATHEMATICA
CoefficientList[Series[1 / ((1 - x)^3 (1 - x^3)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Jun 23 2013 *)
PROG
(PARI) Vec(1/((1-x)^3*(1-x^3)^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 25 2012
(PARI) a(n)=1/216 * n^4 + 1/12 * n^3 + 37/72 * n^2 + [5/4, 139/108, 131/108][1+n%3] * n + [1, 10/9, 7/9][1+n%3] \\ Yurii Ivanov, Jul 06 2021
(Magma)
R<x>:=PowerSeriesRing(Integers(), 60);
Coefficients(R!( 1/((1-x)^3*(1-x^3)^2) )); // G. C. Greubel, Oct 22 2024
(SageMath)
def A011779_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/((1-x)^3*(1-x^3)^2) ).list()
A011779_list(60) # G. C. Greubel, Oct 22 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved