OFFSET
0,2
COMMENTS
A260708 difference table rows have the same nine-step recurrence:
0, 1, 3, 6, 10, 16, 21, 29, 36, 46, 55, 65, 78, 93, ...
1, 2, 3, 4, 6, 5, 8, 7, 10, 9, 13, 10, 15, 12, ... = a(n)
1, 1, 1, 2, -1, 3, -1, 3, -1, 4, -3, 5, -3, 5, ... = b(n)
0, 0, 1, -3, 4, -4, 4, -4, 5, -7, 8, -8, 8, -8, ... (see A042965(n)).
(b(2n) + b(2n+1) = A052901(n+2).)
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1500
Index entries for linear recurrences with constant coefficients, signature (0,1,0,0,0,1,0,-1).
FORMULA
a(n+6) = a(n) + period of length 2: repeat 7, 5.
a(2n) + a(2n+1) = 3 + 4*n.
a(n) = n + 1 + (-1)^n*A152467(n+2).
From Colin Barker, Nov 22 2015: (Start)
a(n) = a(n-2) + a(n-6) - a(n-8) for n>7.
G.f.: (x^6+x^5+3*x^4+2*x^3+2*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2-x+1)*(x^2+x+1)).
(End)
MATHEMATICA
RecurrenceTable[{a[n] == a[n-2] + a[n-6] - a[n-8], a[0]=1, a[1]=2, a[2]=3, a[3]=4, a[4]=6, a[5]=5, a[6]=8, a[7]=7}, a, {n, 0, 100}] (* G. C. Greubel, Nov 23 2015 *)
PROG
(PARI) Vec((x^6+x^5+3*x^4+2*x^3+2*x^2+2*x+1)/((x-1)^2*(x+1)^2*(x^2-x+1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 22 2015
(PARI) vector(100, n, n--; n + (-1)^n *((n+2)\6) + 1) \\ Altug Alkan, Nov 24 2015
(Magma) I:=[1, 2, 3, 4, 6, 5, 8, 7]; [n le 8 select I[n] else Self(n-2) + Self(n-6) - Self(n-8): n in [1..70]]; // Vincenzo Librandi, Dec 26 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 22 2015
STATUS
approved