A173711 Nonnegative integers, six even followed by two odd.
0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1,-1,1,1,-1).
Programs
-
Magma
I:=[0,0,0,0,0,0,1]; [n le 7 select I[n] else Self(n-1) + Self(n-2) - Self(n-3)-Self(n-4)+Self(n-5)+Self(n-6)-Self(n-7): n in [1..80]]; // Vincenzo Librandi, Nov 24 2016
-
Mathematica
LinearRecurrence[{1,1,-1,-1,1,1,-1},{0,0,0,0,0,0,1},50] (* G. C. Greubel, Nov 23 2016 *) CoefficientList[Series[x^6 / ((x + 1) (x^4 + 1) (x - 1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 24 2016 *) Table[If[EvenQ[n],PadRight[{},6,n],{n,n}],{n,0,20}]//Flatten (* Harvey P. Dale, Nov 07 2020 *)
Formula
G.f.: x^6 / ((x+1)*(x^4+1)*(x-1)^2).
a(n) = a(n-1) + a(n-2) - a(n-3) - a(n-4) + a(n-5) + a(n-6) - a(n-7). - G. C. Greubel, Nov 23 2016