OFFSET
1,2
COMMENTS
See the first two comments on A221874.
For the corresponding numbers whose square is 10*m^2 - 6, see A281647. - Jon E. Schoenfield, Aug 05 2023
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,38,0,-1).
FORMULA
G.f.: x*(1-x)*(1+8*x+x^2)/((1-6*x-x^2)*(1+6*x-x^2)).
a(n) = ((5-t*(-1)^n)*(3+t)^(2*floor(n/2)) + (5+t*(-1)^n)*(3-t)^(2*floor(n/2)))/10, where t=sqrt(10).
a(n)*a(n-3) - a(n-1)*a(n-2) = 36 + 12(-1)^n.
MATHEMATICA
LinearRecurrence[{0, 38, 0, -1}, {1, 7, 31, 265}, 22]
PROG
(Magma)
m:=22; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x)*(1+8*x+x^2)/((1-6*x-x^2)*(1+6*x-x^2))));
(Maxima)
makelist(expand(((5-sqrt(10)*(-1)^n)*(3+sqrt(10))^(2*floor(n/2))+(5+sqrt(10)*(-1)^n)*(3-sqrt(10))^(2*floor(n/2)))/10), n, 1, 22);
(Magma) I:=[1, 7, 31, 265]; [n le 4 select I[n] else 38*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Mar 25 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jan 28 2013
STATUS
approved