login
A066104
a(2n) = 2n, a(2n+1) = 4(n+1).
2
0, 4, 2, 8, 4, 12, 6, 16, 8, 20, 10, 24, 12, 28, 14, 32, 16, 36, 18, 40, 20, 44, 22, 48, 24, 52, 26, 56, 28, 60, 30, 64, 32, 68, 34, 72, 36, 76, 38, 80, 40, 84, 42, 88, 44, 92, 46, 96, 48, 100, 50, 104, 52, 108, 54, 112, 56, 116, 58, 120, 60, 124, 62, 128, 64, 132, 66, 136
OFFSET
0,2
COMMENTS
Fourth column of table A210530 for n>0. - Boris Putievskiy, Jan 29 2013
FORMULA
a(n) = 2*A065423(n+1).
O.g.f.: 2*x(2+x)/(1-x^2)^2. - Len Smiley, Dec 06 2001
a(n) = (3*n+2-(n+2)*(-1)^n)/2. - Boris Putievskiy, Jan 29 2013
MATHEMATICA
Table[(3*n+2-(n+2)*(-1)^n)/2, {n, 0, 50}] (* or *) LinearRecurrence[{0, 2, 0, -1}, {0, 4, 2, 8}, 50] (* G. C. Greubel, Dec 24 2016 *)
PROG
(PARI) { for (n=0, 1000, if(n%2, a=2*n + 2, a=n); write("b066104.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 14 2009
(PARI) concat([0], Vec(2*x*(x+2)/(1-x^2)^2 + O(x^50))) \\ G. C. Greubel, Dec 24 2016
CROSSREFS
Sequence in context: A068504 A080965 A083703 * A143095 A141073 A261830
KEYWORD
easy,nonn
AUTHOR
George E. Antoniou, Dec 04 2001
STATUS
approved