OFFSET
1,2
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
F. Javier de Vega, An extension of Furstenberg's theorem of the infinitude of primes, arXiv:2003.13378 [math.NT], 2020.
S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), 1917-1926.
S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), 1917-1926. (Annotated scanned copy)
Index entries for linear recurrences with constant coefficients, signature (2, 1, -4, 1, 2, -1).
FORMULA
G.f.: x*(x^4+2*x^3+2*x^2+1)/(-1+x)^2/(-1+x^2)^2.
MAPLE
a:= n-> (Matrix([[0, -1, -4, -11, -22, -41]]). Matrix(6, (i, j)-> if (i=j-1) then 1 elif j=1 then [2, 1, -4, 1, 2, -1][i] else 0 fi)^n)[1, 1]:
seq(a(n), n=1..38); # Alois P. Heinz, Jul 31 2008
MATHEMATICA
a[n_] := 1/8*(2*n^3-2*n^2+5*n-(-1)^n*(n+1)+1); Array[a, 40] (* Jean-François Alcover, Mar 13 2014 *)
CoefficientList[Series[(x^4 + 2 x^3 + 2 x^2 + 1)/(-1 + x)^2/(-1 + x^2)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Mar 15 2014 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 2, 7, 14, 29, 48}, 50] (* Harvey P. Dale, Oct 13 2024 *)
PROG
(Magma) [1/8*(2*n^3-2*n^2+5*n-(-1)^n*(n+1)+1): n in [1..50]]; // Vincenzo Librandi, Mar 15 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, Mar 15 2014
STATUS
approved