OFFSET
1,2
COMMENTS
Hexaperiodic differences: 1, 1, 2, -1, 2, 1; 0, 1, -3, 3, -1, 0 (even palindromic signed); 1,-4, 6, -4, 1, 0.
LINKS
Frieder Mittmann, Table of n, a(n) for n = 1..1002
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
a(n) = A008585(n/3) if n is congruent to 0 mod 3. - Frieder Mittmann, Nov 11 2014
a(n) = A007310((n-1)/3) if n is congruent to 1 mod 3. - Frieder Mittmann, Nov 11 2014
a(n) = A047235((n-2)/3) if n is congruent to 2 mod 3. - Frieder Mittmann, Nov 11 2014
G.f.: x*(2*x^5-x^4+2*x^3+x^2+x+1) / ((x-1)^2*(x+1)*(x^2-x+1)*(x^2+x+1)). - Colin Barker, Nov 11 2014
a(n) = (24*floor(n/6)-3*(n^2-3*n-2)-9*floor(n/3)*(3*floor(n/3)-2*n+3)+(-1)^floor(n/3)*(3*n^2-5*n-6+3*floor(n/3)*(9*floor(n/3)-6*n+5)))/4. - Luce ETIENNE, Apr 18 2017
MAPLE
seq(seq(6*i+s, s=[1, 2, 3, 5, 4, 6]), i=0..100); # Robert Israel, Nov 11 2014
MATHEMATICA
Drop[CoefficientList[Series[x (2x^5 - x^4 + 2x^3 + x^2 + x + 1)/((x - 1)^2 (x + 1) (x^2 - x + 1) (x^2 + x + 1)), {x, 0, 100}], x], 1] (* Indranil Ghosh, Apr 18 2017 *)
Table[Sum[(7 #1 - 13 #2 + 17 #3 - 3 #4 + 2 #5 + 2 #6)/30 & @@ Mod[k + Range[0, 5], 6], {k, 0, n}], {n, 0, 71}] (* Michael De Vlieger, Apr 22 2017 *)
PROG
(PARI) Vec(x*(2*x^5-x^4+2*x^3+x^2+x+1)/((x-1)^2*(x+1)*(x^2-x+1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 11 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 15 2007
STATUS
approved