OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-6,1).
FORMULA
a(n) = 6*a(n-1)-6*a(n-2)+a(n-3) for n>3.
G.f.: 7*x*(x-4)*(x+1) / ((x-1)*(x^2-5*x+1)).
a(n) = 7*(-2+(2^(-1-n)*((5-sqrt(21))^n*(-7+sqrt(21))+(5+sqrt(21))^n*(7+sqrt(21))))/sqrt(21)). - Colin Barker, Mar 05 2016
EXAMPLE
189 is in the sequence because (189+28)^3 - 189^3 = 1862^2.
MATHEMATICA
LinearRecurrence[{6, -6, 1}, {28, 189, 959}, 30] (* Harvey P. Dale, Dec 14 2016 *)
PROG
(PARI) Vec(7*x*(x-4)*(x+1)/((x-1)*(x^2-5*x+1)) + O(x^40))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Oct 30 2015
STATUS
approved