[go: up one dir, main page]

login
A263694
Expansion of (1 + x + x^2 + x^3 + 4*x^4 - x^5 - x^6 - x^7 + 3*x^8)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7)).
0
1, 2, 3, 4, 8, 7, 6, 5, 9, 10, 11, 12, 16, 15, 14, 13, 17, 18, 19, 20, 24, 23, 22, 21, 25, 26, 27, 28, 32, 31, 30, 29, 33, 34, 35, 36, 40, 39, 38, 37, 41, 42, 43, 44, 48, 47, 46, 45, 49, 50, 51, 52, 56, 55, 54, 53, 57, 58, 59, 60, 64, 63, 62, 61, 65, 66, 67, 68, 72, 71, 70, 69, 73, 74, 75
OFFSET
0,2
COMMENTS
In each group of 8 consecutive numbers, swap 5 and 8 terms, 6 and 7 terms.
FORMULA
G.f.: (1 + x + x^2 + x^3 + 4*x^4 - x^5 - x^6 - x^7 + 3*x^8)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7)).
a(n) = a(n-1) + a(n-8) - a(n-9).
a(n) = 1 + n + 3*floor(n/4) - 2*floor((n+1)/8) - 2*floor((n+2)/8) - 2*floor((n+3)/8). - Vaclav Kotesovec, Apr 19 2016
MATHEMATICA
CoefficientList[Series[(1 + x + x^2 + x^3 + 4 x^4 - x^5 - x^6 - x^7 + 3 x^8)/((1 - x)^2 (1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7)), {x, 0, 75}], x]
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 2, 3, 4, 8, 7, 6, 5, 9}, 75]
PROG
(PARI) x='x+O('x^99); Vec((1+x+x^2+x^3+4*x^4-x^5-x^6-x^7+3*x^8)/((1-x)^2*(1+x+x^2+x^3 +x^4+x^5+x^6+x^7))) \\ Altug Alkan, Apr 18 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Apr 17 2016
STATUS
approved