OFFSET
0,1
COMMENTS
For all members x of the sequence, 3*x^2 - 11 is a square. - Sture Sjöstedt, Nov 30 2011
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-1).
FORMULA
Sequence satisfies -11 = f(a(n), a(n+1)) where f(u, v) = u^2 + v^2 - 4*u*v.
G.f.: (2 - 3*x) / (1 - 4*x + x^2). a(n) = (11 + a(n-1)^2) / a(n-2).
a(n) = ((2-sqrt(3))^n*(-1+2*sqrt(3))+(2+sqrt(3))^n*(1+2*sqrt(3)))/(2*sqrt(3)). - Colin Barker, Oct 12 2015
MATHEMATICA
a[0] := 2; a[1] := 5; a[n_] := a[n] = 4a[n - 1] - a[n - 2]; Table[a[n], {n, 0, 24}] (* Alonso del Arte, Nov 30 2011 *)
PROG
(PARI) {a(n) = real( (2 + quadgen(12))^n * ( 2 + 1 / quadgen(12) ))}
(PARI) {a(n) = subst( (4*polchebyshev(n) + polchebyshev(n-1)) / 3, x, 2)}
(Magma) I:=[2, 5]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 06 2015
(PARI) Vec((2-3*x)/(1-4*x+x^2) + O(x^40)) \\ Colin Barker, Oct 12 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Sep 19 2008
STATUS
approved