A261671 If n even, a(n) = 6n+3, otherwise a(n) = n.
3, 1, 15, 3, 27, 5, 39, 7, 51, 9, 63, 11, 75, 13, 87, 15, 99, 17, 111, 19, 123, 21, 135, 23, 147, 25, 159, 27, 171, 29, 183, 31, 195, 33, 207, 35, 219, 37, 231, 39, 243, 41, 255, 43, 267, 45, 279, 47, 291, 49, 303, 51, 315, 53, 327, 55, 339, 57, 351, 59, 363
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
Table[If[EvenQ[n],6n+3,n],{n,0,60}] (* or *) LinearRecurrence[{0,2,0,-1},{3,1,15,3},70] (* Harvey P. Dale, Dec 30 2023 *)
-
PARI
Vec((x^3+9*x^2+x+3)/((x-1)^2*(x+1)^2) + O(x^100)) \\ Colin Barker, Sep 13 2015
Formula
From Colin Barker, Sep 13 2015: (Start)
a(n) = (3+3*(-1)^n+7*n+5*(-1)^n*n)/2.
a(n) = 2*a(n-2) - a(n-4) for n>3.
G.f.: (x^3+9*x^2+x+3) / ((x-1)^2*(x+1)^2).
(End)
Comments