OFFSET
0,2
REFERENCES
A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 194-196.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,27).
FORMULA
a(n) = (3^n/4)*(3^(n+1) + (-1)^n).
a(n) = 6*a(n-1) + 27*a(n-2), with a(0)=1, a(1)=6.
E.g.f.: (3*exp(9*x) + exp(-3*x))/4. - G. C. Greubel, May 16 2019
MATHEMATICA
LinearRecurrence[{6, 27}, {1, 6}, 20] (* G. C. Greubel, May 16 2019 *)
PROG
(PARI) my(x='x+O('x^20)); Vec(1/((1+3*x)*(1-9*x))) \\ G. C. Greubel, May 16 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 20); Coefficients(R!( 1/((1+3*x)*(1-9*x)) )); // G. C. Greubel, May 16 2019
(Sage) (1/((1+3*x)*(1-9*x))).series(x, 20).coefficients(x, sparse=False) # G. C. Greubel, May 16 2019
(GAP) a:=[1, 6];; for n in [3..30] do a[n]:=6*a[n-1]+27*a[n-2]; od; a; # G. C. Greubel, May 16 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Barry E. Williams, Jan 15 2000
STATUS
approved