OFFSET
0,2
COMMENTS
-8*a(n)^2 + b(n)^2 = 17, with the companion sequence b(n)= A077242(n).
The number a > 0 belongs to the sequence A077241, if a^2 belongs to the sequence A034856. - Alzhekeyev Ascar M, Apr 27 2012
Numbers k such that k^2 + 2 is a triangular number (see A214838). - Alex Ratushnyak, Mar 07 2013
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (0,6,0,-1).
FORMULA
G.f.: (1+x)*(1+x+x^2)/(1-6*x^2+x^4).
a(n) = (-1)^n*((4-5*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor((n+1)/2))+(4+5*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor((n+1)/2)))/8. [Bruno Berselli, Mar 10 2013]
EXAMPLE
8*a(2)^2 + 17 = 8*8^2+17 = 529 = 23^2 = A077242(2)^2.
MATHEMATICA
LinearRecurrence[{0, 6, 0, -1}, {1, 2, 8, 13}, 30] (* Bruno Berselli, Mar 10 2013 *)
CoefficientList[Series[(1 + x) (1 + x + x^2)/(1 - 6 x^2 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 18 2014 *)
PROG
(Maxima) makelist(expand((-1)^n*((4-5*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor((n+1)/2))+(4+5*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor((n+1)/2)))/8), n, 0, 30); /* Bruno Berselli, Mar 10 2013 */
(Magma) I:=[1, 2, 8, 13]; [n le 4 select I[n] else 6*Self(n-2)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 18 2014
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Nov 08 2002
STATUS
approved