OFFSET
0,4
COMMENTS
Ratio at n=30 is 3.515489857847214.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,9,4,-16).
FORMULA
a(n) = Product_{k=1..(n-1)/2} ( 1 + m*cos(k*Pi/n)^2 + p*cos(k*Pi/n)^4 ), with m=4 and p=64.
G.f.: (1-x)*(1+x-8*x^2-16*x^3)/(1-x-9*x^2-4*x^3+16*x^4). - Colin Barker, Oct 23 2013
MAPLE
seq(coeff(series((1-x)*(1+x-8*x^2-16*x^3)/(1-x-9*x^2-4*x^3+16*x^4), x, n+1), x, n), n = 0..30); # G. C. Greubel, Sep 26 2019
MATHEMATICA
m=4; l=4^3; Table[Product[1 +m*Cos[k*Pi/n]^2 +l*Cos[k*Pi/n]^4, {k, (n -1)/2}], {n, 0, 30}]//Round
LinearRecurrence[{1, 9, 4, -16}, {1, 1, 1, 6, 19}, 30] (* G. C. Greubel, Sep 26 2019 *)
PROG
(PARI) a(n) = round(prod(k=1, (n-1)/2, 1+4*cos(k*Pi/n)^2+4^3*cos(k*Pi/n)^4)) \\ Colin Barker, Oct 23 2013
(PARI) my(x='x+O('x^30)); Vec((1-x)*(1+x-8*x^2-16*x^3)/(1-x-9*x^2-4*x^3 +16*x^4)) \\ G. C. Greubel, Sep 26 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)* (1+x-8*x^2-16*x^3)/(1-x-9*x^2-4*x^3+16*x^4) )); // G. C. Greubel, Sep 26 2019
(Sage)
def A152098_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-x)*(1+x-8*x^2-16*x^3)/(1-x-9*x^2-4*x^3+16*x^4)).list()
A152098_list(30) # G. C. Greubel, Sep 26 2019
(GAP) a:=[1, 1, 6, 19];; for n in [5..30] do a[n]:=a[n-1]+9*a[n-2]+4*a[n-3] -16*a[n-4]; od; Concatenation([1], a); # G. C. Greubel, Sep 26 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Nov 24 2008
STATUS
approved