A131360 a(4n) = a(4n+1) = 0, a(4n+2) = 2n, a(4n+3) = 2n+1.
0, 0, 0, 1, 0, 0, 2, 3, 0, 0, 4, 5, 0, 0, 6, 7, 0, 0, 8, 9, 0, 0, 10, 11, 0, 0, 12, 13, 0, 0, 14, 15, 0, 0, 16, 17, 0, 0, 18, 19, 0, 0, 20, 21, 0, 0, 22, 23, 0, 0, 24, 25, 0, 0, 26, 27, 0, 0, 28, 29, 0, 0, 30, 31, 0, 0, 32, 33, 0, 0, 34, 35, 0, 0, 36, 37, 0, 0, 38, 39, 0, 0, 40, 41, 0, 0, 42, 43
Offset: 0
Links
- Colin Barker, 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
-
Mathematica
Array[Floor[(# - 1)/2] Floor[Mod[#, 4]/2] &, 88, 0] (* Michael De Vlieger, Sep 22 2021 *)
-
PARI
concat(vector(3), Vec(x^3*(x^3+x^2-x+1)/((x-1)^2*(x+1)*(x^2+1)^2) + O(x^100))) \\ Colin Barker, Jul 01 2015
Formula
G.f.: x^3*(x^3+x^2-x+1) / ((x-1)^2*(x+1)*(x^2+1)^2). - Colin Barker, Jul 01 2015
a(n) = (cos(n*Pi/2)+sin(n*Pi/2)-1)*((2n-3)*cos(n*Pi/2)+cos(n*Pi)+(2n-3)*sin(n*Pi/2))/8. - Wesley Ivan Hurt, Sep 24 2017
a(n) = floor((n-1)/2)*A021913(n). - Lechoslaw Ratajczak, Sep 22 2021