OFFSET
0,1
COMMENTS
This sequence with a(-1) = 5 is one of five sequences which together contain all nonnegative numbers k such that 13*k^2 + 324*(-1)^n is a square (see formulas). The other four sequences, also with offset -1 and signature (3,1), are b1 = {6, 3, 15, 48, 159, 525, ...}, b2 = {5, 8, 29, 95, 314, 1037, ...}, b3 = {9, 0, 9, 27, 90, 297, ...}, b4 = {6, 15, 51, 168, 555, 1833, ...}. The second formula below also applies to these sequences. - Klaus Purath, Jul 01 2021
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..1921
Sergio Falcon, The k-Fibonacci difference sequences, Chaos, Solitons & Fractals, Volume 87, June 2016, Pages 153-157.
Index entries for linear recurrences with constant coefficients, signature (3,1).
FORMULA
G.f.: (7 + 5*x)/(1 - 3*x - x^2). - Vincenzo Librandi, Feb 26 2017
a(n) = (2^(-1-n)*((3-sqrt(13))^n*(-31+7*sqrt(13)) + (3+sqrt(13))^n*(31+7*sqrt(13)))) / sqrt(13). - Colin Barker, Feb 26 2017
From Klaus Purath, Jul 01 2021: (Start)
13*a(n)^2 + 324*(-1)^n = (a(n-1) + a(n+1))^2, n >= 0.
a(n) = (a(n-1)^2 + 81*(-1)^(n-1))/a(n-2), n >= 1. (End)
MATHEMATICA
LinearRecurrence[{3, 1}, {7, 26}, 27] (* Indranil Ghosh, Feb 26 2017 *)
RecurrenceTable[{a[0]==7, a[1]==26, a[n]==3 a[n-1] + a[n-2]}, a, {n, 40}] (* or *) CoefficientList[Series[(7 + 5 x)/(1 - 3 x - x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Feb 26 2017 *)
PROG
(Magma) I:=[7, 26]; [n le 2 select I[n] else 3*Self(n-1)+Self(n-2): n in [1..40]]; // Vincenzo Librandi, Feb 26 2017
(PARI) Vec((7 + 5*x)/(1 - 3*x - x^2) + O(x^30)) \\ Colin Barker, Feb 26 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Feb 26 2017
STATUS
approved