OFFSET
1,3
COMMENTS
Here the site swap pattern ..., 5, 18, 4, 14, 3, 10, 2, 6, 1, 2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... that spans over the Z (zero throw is at t=0) has been folded to N by picking values at t=0, t=1, t=-1, t=2, t=-2, t=3, t=-3, etc. successively.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Joe Buhler and R. L. Graham, Juggling Drops and Descents, Amer. Math. Monthly, 101, (no. 6) 1994, 507 - 519.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,2,0,0,0,-1).
FORMULA
a(2*k+2) = k+1, a(4*k+1) = k, a(4*k+3) = 4*k+2. - Ralf Stephan, Jun 10 2005
G.f.: x^2*(2*x^5+x^4+x^3+2*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Feb 18 2013
a(n) = 2*a(n-4)-a(n-8) for n>8. - Colin Barker, Oct 29 2016
a(n) = (9*n-5-(n-5)*(-1)^n-3*(n-1)*(1-(-1)^n)*(-1)^((2*n-1+(-1)^n)/4))/16. - Luce ETIENNE, Oct 29 2016
EXAMPLE
G.f. = x^2 + 2*x^3 + 2*x^4 + x^5 + 3*x^6 + 6*x^7 + 4*x^8 + 2*x^9 + ...
MAPLE
[seq((InfRisingSS(N2Z(n))-N2Z(n)), n=1..120)]; N2Z := n -> ((-1)^n)*floor(n/2); Z2N := z -> 2*abs(z)+`if`((z < 1), 1, 0);
PROG
(PARI) concat(0, Vec(x^2*(2*x^5+x^4+x^3+2*x^2+2*x+1)/((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100))) \\ Colin Barker, Oct 29 2016
(PARI) {a(n) = if( n%2==0, n/2, n%4==1, n\4, n-1)}; /* Michael Somos, Nov 06 2016 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Oct 19 2001
STATUS
approved