OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
2k+1 interleaved with 4k+1.
a(n) = (3/2)*n - (n/2)*(-1)^n - 1. - Ridouane Oudra, Sep 08 2023
From Stefano Spezia, Dec 04 2023: (Start)
O.g.f.: x*(1 + x + 3*x^2 + x^3)/((1 - x)^2*(1 + x)^2).
E.g.f.: 1 + (2*x - 1)*cosh(x) + (x - 1)*sinh(x). (End)
MAPLE
seq((3/2)*n - (n/2)*(-1)^n - 1, n=1..60); # Ridouane Oudra, Sep 08 2023
MATHEMATICA
Table[Riffle[{4*n + 1}, {2*n + 1} ], {n, 0, 50}] // Flatten (* G. C. Greubel, Oct 21 2017 *)
PROG
(Python)
def A133090(n): return (n<<1)-1 if n&1 else n-1 # Chai Wah Wu, Apr 04 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Sep 09 2007
EXTENSIONS
Terms a(17) onward added by G. C. Greubel, Oct 21 2017
STATUS
approved