OFFSET
0,3
COMMENTS
This sequence can be continued periodically for negative values of n, and then a(-n) = a(n).
This is the seventh sequence of a k-family of sequences P_k, k>=1, which starts with A000007(n+1), n>=0, (the 0-sequence), A000035, A193680, A193682, A203572, A for k=1..6, respectively.
See a comment on A203571 for the general case of the P_k sequences. For a(n)=P_7(n) the nonnegative members of the equivalence classes [0], [1],...,[6], defined by p==q iff P_7(p)=P_7(q), are found in the array A113807 if there the last class [7], starting with 7, is replaced by 0,7,14,..., to become the first class [0] (nonnegative part).
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
EXAMPLE
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.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Jan 17 2012
STATUS
approved