A188167 a(2+4*n)=1+2*n, otherwise a(n)=2*n.
0, 2, 1, 6, 8, 10, 3, 14, 16, 18, 5, 22, 24, 26, 7, 30, 32, 34, 9, 38, 40, 42, 11, 46, 48, 50, 13, 54, 56, 58, 15, 62, 64, 66, 17, 70, 72, 74, 19, 78, 80, 82, 21, 86, 88, 90, 23, 94, 96, 98, 25, 102, 104, 106, 27, 110, 112, 114, 29, 118, 120, 122, 31, 126, 128, 130, 33, 134, 136, 138, 35, 142, 144, 146, 37, 150, 152, 154, 39
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,2,0,0,0,-1).
Programs
-
Mathematica
LinearRecurrence[{0,0,0,2,0,0,0,-1},{0,2,1,6,8,10,3,14},80] (* Harvey P. Dale, Nov 27 2012 *)
Formula
a(n) = 2*a(n-4) - a(n-8).
a(n) = a(n-4) + (period 4: repeat [8, 8, 2, 8]).
From Bruno Berselli, Apr 08 2011: (Start)
G.f.: x*(2+x+6*x^2+8*x^3+6*x^4+x^5+2*x^6)/(1-x^4)^2.
a(n) = (16 - 3*(1+(-1)^n)*(1-i^n))*n/8, where i=sqrt(-1). (End)
E.g.f.: x*(8*cosh(x) - 3*sin(x) + 5*sinh(x))/4. - Stefano Spezia, Aug 08 2025