OFFSET
0,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
F. Beukers, The multiplicity of binary recurrences, Compositio Mathematica, Tome 40 (1980) no. 2, pp. 251-267. See Theorem 2, p. 259.
M. Mignotte, Propriétés arithmétiques des suites récurrentes, Besançon, 1988-1989, see p. 14. In French.
Index entries for linear recurrences with constant coefficients, signature (3,-4).
FORMULA
EXAMPLE
G.f. = 1 + x - x^2 - 7*x^3 - 17*x^4 - 23*x^5 - x^6 + 89*x^7 + 271*x^8 + ...
MAPLE
A247560:=n->simplify((1/14*I)*sqrt(7)*((3/2+(1/2*I)*sqrt(7))^n-(3/2-(1/2*I)*sqrt(7))^n)+1/2*((3/2+(1/2*I)*sqrt(7))^n+(3/2-(1/2*I)*sqrt(7))^n)): seq(A247560(n), n=0..40); # Wesley Ivan Hurt, Oct 02 2014
MATHEMATICA
a[ n_] := Re[ (1 - 1/Sqrt[-7]) (3 + Sqrt[-7])^n / 2^n];
LinearRecurrence[{3, -4}, {1, 1}, 40] (* Harvey P. Dale, Jun 13 2017 *)
PROG
(PARI) {a(n) = real( (1 + quadgen(-7))^n )};
(Haskell)
a247560 n = a247560_list !! n
a247560_list = 1 : 1 : zipWith (-) (map (* 3) $ tail a247560_list)
(map (* 4) a247560_list)
-- Reinhard Zumkeller, Sep 20 2014
(Sage)
[((1-1/sqrt(-7))*(3+sqrt(-7))^n/2^n).real() for n in range(34)] # Peter Luschny, Oct 02 2014 (after Somos)
(Magma) I:=[1, 1]; [n le 2 select I[n] else 3*Self(n-1) - 4*Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 04 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Sep 19 2014
STATUS
approved