OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
a(n) = A130658(n) + n.
G.f.: (1 + 2*x^2 - x^3)/((1 - x)^2*(1 + x^2)). - Stefano Spezia, Feb 19 2021
MATHEMATICA
A341744[n_] := Module[{a}, a[0] = 1; a[1] = 2; a[i_] := a[i] = a[i - a[i - 2]] + i; a[n]]; Table[A341744[n], {n, 0, 10}] (* José María Grau Ribas, Feb 18 2020, edited by Robert P. P. McKone, Feb 19 2021 *)
CoefficientList[Series[(1 + 2 x^2 - x^3)/((1 - x)^2*(1 + x^2)), {x, 0, 69}], x] (* Michael De Vlieger, Mar 19 2021 *)
LinearRecurrence[{2, -2, 2, -1}, {1, 2, 4, 5}, 90] (* Harvey P. Dale, Jun 19 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Feb 18 2021
STATUS
approved