A204453 Period length 14: [0, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1] repeated.
0, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 0, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5
Offset: 0
Examples
a(16) = 16(mod 7) = 2 because 16\7 = floor(16/7)=2 is even; the sign is +1. a(9) = (7-9)(mod 7) = 5 because 9\7 = floor(9/7)=1 is odd; the sign is -1.
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,1).
Formula
a(n) = n(mod 7) if (-1)^floor(n/7)=+1 else (7-n)(mod 7), n>=0. (-1)^floor(n/7) is the sign corresponding to the parity of the quotient floor(n/7). This quotient is sometimes denoted by n\7.
O.g.f.: x*(1+2*x+3*x^2+4*x^3+5*x^4+6*x^5+6*x^7+5*x^8+4*x^9+ 3*x^10+2*x^11+x^12)/(1-x^14).
a(n) = (7*m*(m^4-21*m^3+175*m^2-735*m+1624)*((-1)^floor(n/7)-1)-10908*(-1)^floor(n/7)+12348)*m/1440 where m = n-7*floor(n/7). - Luce ETIENNE, Oct 13 2017
Comments