OFFSET
0,4
COMMENTS
Successive sequences:
0: 0, 0, 0, 0, ... = 0 * ( )
1: 4, -3, 11, -8, ... = 1 * ( )
2: 1, 8, 3, 16, ... = 1 * ( ) A195161
3: 12, 0, 27, -3, ... = 3 * (4, 0, 9, -1, ...)
4: 4, 24, 8, 40, ... = 4 * (1, 6, 2, 10, ...) A064680
5; 28, 5, 51, 4, ... = 1 * ( )
6: 9, 48, 15, 72, ... = 3 * (3, 16, 5, 24, ...) A195161
7: 52, 12, 83, 13, ... = 1 * ( )
8: 16, 80, 24, 112, ... = 8 * (2, 10, 3, 14, ...) A064080
9: 84 21, 123, 24, ... = 3 * (28, 7, 41, 8, ...)
10: 25, 120, 35, 160, ... = 5 * (5, 24, 7, 32, ...) A195161
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384
Index entries for linear recurrences with constant coefficients, signature (0,-1,0,1,0,2,0,1,0,-1,0,-1).
FORMULA
G.f.: -x*( -1 - x - 4*x^2 - 5*x^3 - 3*x^4 - 6*x^5 + 3*x^6 - 5*x^7 + 4*x^8 - x^9 + x^10 )/( (x^2 - x + 1)*(1 + x + x^2)*(x - 1)^2*(1 + x)^2*(1 + x^2)^2 ). - R. J. Mathar, Jan 31 2017
a(2*k) = A022998(k).
a(2*k+1) = A109007(k-1).
a(3*k) = interleave 3*k*(3 +(-1)^k)/2, 3.
a(3*k+1) = interleave 1, A166304(k).
a(3*k+2) = interleave A166138(k), 1.
a(4*k) = 4*k.
a(4*k+1) = period 3: repeat [1, 1, 3].
a(4*k+2) = 1 + 2*k.
a(4*k+3) = period 3: repeat [3, 1, 1].
a(n+12) - a(n) = 6*A131743(n+3).
a(n) = (18*n + 40 - 16*cos(n*Pi/3) + 9*n*cos(n*Pi/2) + 32*cos(2*n*Pi/3) + (18*n - 40)*cos(n*Pi) + 3*n*cos(3*n*Pi/2) - 16*cos(5*n*Pi/3))/48. - Wesley Ivan Hurt, Oct 04 2018
MATHEMATICA
CoefficientList[Series[(-x (-1 - x - 4 x^2 - 5 x^3 - 3 x^4 - 6 x^5 + 3 x^6 - 5 x^7 + 4 x^8 - x^9 + x^10))/((x^2 - x + 1) (1 + x + x^2) (x - 1)^2*(1 + x)^2*(1 + x^2)^2), {x, 0, 79}], x] (* Michael De Vlieger, Feb 02 2017 *)
PROG
(PARI) f(n) = numerator((4 + n^2)/4);
a(n) = gcd(vector(1000, k, f(k+n) - f(k))); \\ Michel Marcus, Jan 15 2017
(PARI) A281098(n) = if(n%2, gcd((n\2)-1, 3), n>>(bitand(n, 2)/2)); \\ Antti Karttunen, Feb 15 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jan 14 2017
EXTENSIONS
Corrected and extended by Michel Marcus, Jan 15 2017
STATUS
approved