A066070 a(1) = 1; for m > 0, a(2m) = 2(2m+1), a(2m+1) = 2m+1.
1, 6, 3, 10, 5, 14, 7, 18, 9, 22, 11, 26, 13, 30, 15, 34, 17, 38, 19, 42, 21, 46, 23, 50, 25, 54, 27, 58, 29, 62, 31, 66, 33, 70, 35, 74, 37, 78, 39, 82, 41, 86, 43, 90, 45, 94, 47, 98, 49, 102, 51, 106, 53, 110, 55, 114, 57, 118, 59, 122, 61, 126, 63, 130, 65, 134, 67, 138
Offset: 1
Links
- Harry J. Smith, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
Crossrefs
Cf. A066069.
Programs
-
Mathematica
LinearRecurrence[{0,2,0,-1},{1,6,3,10},70] (* Harvey P. Dale, Jan 13 2022 *)
-
PARI
{ for (n=1, 1000, a=if (n%2, n, 2*n + 2); write("b066070.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 09 2009
Formula
O.g.f.: (x+6x^2+x^3-2x^4)/(1-x^2)^2. - Len Smiley, Dec 05 2001