OFFSET
1,2
LINKS
Stefano Spezia, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
Inverse binomial transform of A131056: (1, 3, 7, 17, 41, 97, 225, ...).
From Colin Barker, Oct 28 2012: (Start)
a(n) = ((-1)^n + 2*n-1)/2 for n > 1.
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 1.
G.f.: x*(x^3-x^2+x+1)/((x-1)^2*(x+1)). (End)
E.g.f.: x*(exp(x) + 1) - sinh(x). - Stefano Spezia, Jan 28 2024
MAPLE
seq(`if`(n=1, 1, n-(n mod 2)), n=1..72);
MATHEMATICA
Join[{1}, Table[2*Floor[i/2], {i, 2, 81}]] (* Stefan Steinerberger, Jun 13 2007 *)
With[{c=2*Range[40]}, Join[{1}, Riffle[c, c]]] (* Harvey P. Dale, Jul 25 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jun 12 2007
EXTENSIONS
More terms from Stefan Steinerberger, Jun 13 2007
STATUS
approved