[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A168273
a(n) = 2*n + (-1)^n - 1.
8
0, 4, 4, 8, 8, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 36, 36, 40, 40, 44, 44, 48, 48, 52, 52, 56, 56, 60, 60, 64, 64, 68, 68, 72, 72, 76, 76, 80, 80, 84, 84, 88, 88, 92, 92, 96, 96, 100, 100, 104, 104, 108, 108, 112, 112, 116, 116, 120, 120, 124, 124, 128, 128, 132
OFFSET
1,2
FORMULA
From R. J. Mathar, Jan 05 2011: (Start)
G.f.: 4*x^2/( (1+x)*(1-x)^2).
a(n) = 2*A052928(n).
a(n) = A008586(floor(n/2)). (End)
a(n) = 2*n - 2*(n mod 2). - Wesley Ivan Hurt, Jun 30 2013
E.g.f.: (1 + (2*x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 16 2016
MATHEMATICA
CoefficientList[Series[4 x / ((1+x) (1-x)^2), {x, 0, 70}], x] (* Vincenzo Librandi, May 14 2013 *)
LinearRecurrence[{1, 1, -1}, {0, 4, 4}, 50] (* G. C. Greubel, Jul 16 2016 *)
PROG
(Magma) [2*n-1 + (-1)^n: n in [1..70]] // Vincenzo Librandi, May 14 2013
(PARI) a(n)=2*n-1+(-1)^n \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
Sequence in context: A053249 A071339 A146890 * A278933 A351838 A377783
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 22 2009
STATUS
approved