A133090 A133081 * [1,2,3,...].
1, 1, 5, 3, 9, 5, 13, 7, 17, 9, 21, 11, 25, 13, 29, 15, 33, 17, 37, 19, 41, 21, 45, 23, 49, 25, 53, 27, 57, 29, 61, 31, 65, 33, 69, 35, 73, 37, 77, 39, 81, 41, 85, 43, 89, 45, 93, 47, 97, 49, 101, 51, 105, 53, 109, 55, 113, 57, 117, 59, 121, 61, 125, 63, 129, 65, 133, 67, 137, 69, 141, 71
Offset: 1
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).
Crossrefs
Cf. A133081.
Programs
-
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 *)
-
Python
def A133090(n): return (n<<1)-1 if n&1 else n-1 # Chai Wah Wu, Apr 04 2024
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)
Extensions
Terms a(17) onward added by G. C. Greubel, Oct 21 2017
Comments