OFFSET
0,1
COMMENTS
y-values in the solutions to 3*x^2+6 = y^2. - Sture Sjöstedt, Nov 25 2011
Positive values of x (or y) satisfying x^2 - 4*x*y + y^2 + 18 = 0. - Colin Barker, Feb 04 2014
Positive values of x (or y) satisfying x^2 - 14*x*y + y^2 + 288 = 0. - Colin Barker, Feb 16 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (4,-1).
FORMULA
G.f.: (3 -6*x +3*x^2)/((1-x)*(1-4*x+x^2)).
a(n) = sqrt(3/2)*(a^(n+1/2) + b^(n+1/2)), with a=2+sqrt(3) and b=2-sqrt(3).
a(n) = sqrt((3/2)*(A003500(2n+1) +2)).
a(n) - a(n-1) = 6*A001353(n).
a(n) == 3 (mod 6).
a(n) = 3 * A001835(n+1).
a(n) = 3*x(n) + 3*y(n) for x(n)= A001075(n) and y(n) = A001353(n) the solutions to x^2 - 3*y^2 = 1. - Greg Dresden and his Math 222 Linear Algebra class, Oct 05 2022
MAPLE
a:=proc(n) option remember; if n=0 then 3 elif n=1 then 9 else 4*a(n-1)-a(n-2); fi; end: seq(a(n), n=0..40); # Wesley Ivan Hurt, Jan 21 2017
MATHEMATICA
CoefficientList[Series[(3-6x+3x^2)/((1-x)(1-4x+x^2)), {x, 0, 25}], x]
LinearRecurrence[{4, -1}, {3, 9}, 30] (* Harvey P. Dale, Aug 28 2019 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((3-6*x+3*x^2)/((1-x)*(1-4*x+x^2))) \\ G. C. Greubel, Feb 25 2019
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (3-6*x+3*x^2)/((1-x)*(1-4*x+x^2)) )); // G. C. Greubel, Feb 25 2019
(Sage) ((3-6*x+3*x^2)/((1-x)*(1-4*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019
(GAP) a:=[3, 9];; for n in [3..30] do a[n]:=4*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Feb 25 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Apr 14 2003
STATUS
approved