OFFSET
1,1
REFERENCES
M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 76.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
G.f.: -2*x*(-2-2*x+x^2-2*x^3+x^4)/(1+x)/(x-1)^4.
a(n) = 3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5).
a(n) = 2*n^3/3+2*n^2+n/3+3/2+(-1)^n/2. [R. J. Mathar, Oct 20 2009]
MATHEMATICA
LinearRecurrence[{3, -2, -2, 3, -1}, {4, 16, 38, 78, 136}, 40] (* Harvey P. Dale, Dec 16 2011 *)
PROG
(Magma) I:=[4, 16, 38, 78, 136]; [n le 5 select I[n] else 3*Self(n-1)-2*Self(n-2)-2*Self(n-3)+3*Self(n-4)-Self(n-5): n in [1..40]]; // Vincenzo Librandi, Dec 11 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. J. Mathar, Mar 22 2009
STATUS
approved