A294178 a(2n) = 2*n + 1, a(2n+1) = 6*n + 3.
1, 3, 3, 9, 5, 15, 7, 21, 9, 27, 11, 33, 13, 39, 15, 45, 17, 51, 19, 57, 21, 63, 23, 69, 25, 75, 27, 81, 29, 87, 31, 93, 33, 99, 35, 105, 37, 111, 39, 117, 41, 123, 43, 129, 45, 135, 47, 141, 49, 147, 51, 153
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
Programs
-
Mathematica
LinearRecurrence[{0,2,0,-1},{1,3,3,9},100] (* Paolo Xausa, Nov 13 2023 *)
-
PARI
Vec((1 + 3*x)*(1 + x^2) / ((1 - x)^2*(1 + x)^2) + O(x^40)) \\ Colin Barker, Jun 29 2018
Formula
a(n) = 2*a(n-2) - a(n-4).
G.f.: (1 + 3*x)*(1 + x^2) / ((1 - x)^2*(1 + x)^2). - Colin Barker, Jun 29 2018