OFFSET
1,2
COMMENTS
a(n) is the n-th almost cobalancing number of second type (see Tekcan and Erdem).
LINKS
Ahmet Tekcan and Alper Erdem, General Terms of All Almost Balancing Numbers of First and Second Type, arXiv:2211.08907 [math.NT], 2022.
Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
FORMULA
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3) for n > 3.
a(n) = (3*(3 - 2*sqrt(2))^n*(2 + sqrt(2)) + 3*(2 - sqrt(2))*(3 + 2*sqrt(2))^n - 4)/8.
O.g.f.: x*(1 + x^2)/((1 - x)*(1 - 6*x + x^2)).
E.g.f.: (3*(2 + sqrt(2))*(cosh(3*x - 2*sqrt(2)*x) + sinh(3*x - 2*sqrt(2)*x)) + 3*(2 - sqrt(2))*(cosh(3*x + 2*sqrt(2)*x) + sinh(3*x + 2*sqrt(2)*x)) - 4*(cosh(x) + sinh(x)) - 8)/8.
EXAMPLE
a(2) = 7 is a term since 8*7^2 + 8*7 - 7 = 441 = 21^2.
MATHEMATICA
LinearRecurrence[{7, -7, 1}, {1, 7, 43}, 24]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Nov 26 2022
STATUS
approved