OFFSET
1,1
COMMENTS
Except for the first term, positive values of x (or y) satisfying x^2 - 6xy + y^2 + 23 = 0. - Colin Barker, Feb 08 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Jeremiah Bartz, Bruce Dearden, and Joel Iiams, Counting families of generalized balancing numbers, The Australasian Journal of Combinatorics (2020) Vol. 77, Part 3, 318-325.
Index entries for linear recurrences with constant coefficients, signature (0,6,0,-1).
FORMULA
a(1..4) = (2,3,9,16); a(n>4) = 6*a(n-2) - a(n-4).
G.f.: -x*(x-1)*(x+2)*(2*x+1) / ((x^2-2*x-1)*(x^2+2*x-1)). - Colin Barker, Feb 08 2014
MAPLE
seq(coeff(series(-x*(x-1)*(x+2)*(2*x+1)/((x^2-2*x-1)*(x^2+2*x-1)), x, n+1), x, n), n = 1..30); # Muniru A Asiru, Sep 28 2018
MATHEMATICA
a[1]=2; a[2]=3; a[3]=9; a[4]=16; a[n_]:=a[n]=6*a[n-2]-a[n-4]; A1=Table[a[n], {n, 25}]
CoefficientList[Series[-(x - 1) (x + 2) (2 x + 1)/((x^2 - 2 x - 1) (x^2 + 2 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 11 2014 *)
PROG
(PARI) Vec(-x*(x-1)*(x+2)*(2*x+1)/((x^2-2*x-1)*(x^2+2*x-1)) + O(x^100)) \\ Colin Barker, Feb 08 2014
(Magma) I:=[2, 3, 9, 16]; [n le 4 select I[n] else 6*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Feb 11 2014
(GAP) a:=[2, 3, 9, 16];; for n in [5..30] do a[n]:=6*a[n-2]-a[n-4]; od; a; # Muniru A Asiru, Sep 28 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Oct 21 2009
STATUS
approved