OFFSET
0,2
COMMENTS
Nonnegative integers k such that 15*k^2 + 9 is a square.
From the recurrence we have a(n) = sqrt(15)*((4 + sqrt(15))^n - (4 - sqrt(15))^n)/10.
LINKS
FORMULA
From Colin Barker, Jan 24 2013: (Start)
a(n) = (sqrt(3/5)*(-(4-sqrt(15))^n + (4+sqrt(15))^n))/2.
G.f.: 3*x/(x^2-8*x+1). (End)
a(n) = 3 * A001090(n).
For n > 0, a(n) is the denominator of the continued fraction [2,3,2,3,...,2,3] with n repetitions of 2,3. For the numerators see A070997. - Greg Dresden, Sep 12 2019
EXAMPLE
G.f. = 3*x + 24*x^2 + 189*x^3 + 1488*x^4 + 11715*x^5 + 92232*x^6 + 726141*x^7 + ...
MATHEMATICA
Do[If[IntegerQ[Sqrt[3 (3 + 5 x^2)]], Print[{x, Sqrt[3 (3 + 5 x^2)]}]], {x, 0, 2000000}]
LinearRecurrence[{8, -1}, {0, 3}, 30] (* Harvey P. Dale, Aug 18 2014 *)
a[ n_] := 3 ChebyshevU[ n - 1, 4]; (* Michael Somos, Oct 14 2015 *)
a[ n_] := 3/2 ((4 + Sqrt[15])^n - (4 - Sqrt[15])^n) / Sqrt[15] // Simplify; (* Michael Somos, Oct 14 2015 *)
PROG
(PARI) {a(n) = subst(poltchebi(n+1) - 4 * poltchebi(n), x, 4) / 5}; /* Michael Somos, Apr 05 2008 */
(PARI) {a(n) = 3 * polchebyshev(n-1, 2, 4)}; /* Michael Somos, Oct 14 2015 */
(PARI) {a(n) = 3 * imag( (4 + quadgen(60))^n )}; /* Michael Somos, Oct 14 2015 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lorenz H. Menke, Jr., Mar 26 2008
EXTENSIONS
Definition corrected by Bruno Berselli, Jan 24 2013
Definition, comments, formulas further corrected by Greg Dresden, Sep 13 2019
Exchanged definition and comment, in order to retain offset 0. - N. J. A. Sloane, Sep 23 2019
STATUS
approved