OFFSET
0,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Paul Barry, Centered polygon numbers, heptagons and nonagons, and the Robbins numbers, arXiv:2104.01644 [math.CO], 2021.
Kai Wang, Fibonacci Numbers And Trigonometric Functions Outline, (2019).
Index entries for linear recurrences with constant coefficients, signature (3,0,-1).
FORMULA
G.f.: (1-4*x+3*x^2)/(1-3*x+x^3).
MAPLE
seq(coeff(series((1-4*x+3*x^2)/(1-3*x+x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 02 2019
MATHEMATICA
LinearRecurrence[{3, 0, -1}, {1, -1, 0}, 40] (* Harvey P. Dale, Nov 14 2014 *)
PROG
(PARI) Vec((1-4*x+3*x^2)/(1-3*x+x^3)+O(x^40)) \\ Charles R Greathouse IV, Jan 17 2012
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-4*x+3*x^2)/(1-3*x+x^3) )); // G. C. Greubel, Oct 02 2019
(Sage)
def A122100_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-4*x+3*x^2)/(1-3*x+x^3)).list()
A122100_list(40) # G. C. Greubel, Oct 02 2019
(GAP) a:=[1, -1, 0];; for n in [4..40] do a[n]:=3*a[n-1]-a[n-3]; od; a; # G. C. Greubel, Oct 02 2019
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Philippe Deléham, Oct 18 2006
STATUS
approved