cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A203572 Period length 12: 0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1 repeated.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 0
Offset: 0

Views

Author

Wolfdieter Lang, Jan 12 2012

Keywords

Comments

This sequence can be continued periodically for negative values of n.
This is the sixth 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, A203571 for k=1,...,5, respectively.
See a comment on A203571 for the general case of the P_k sequences. For a(n)=P_6(n) the nonnegative members of the equivalence classes [0], [1],...,[5], defined by p==q iff P_6(p)=P_6(q), are found in the array A092260 if there class [6], starting with 6, is replaced by 0,6,12,..., which is class [0] (nonnegative part).

Examples

			a(14) = 14(mod 6) = 2 because 14\6 = floor(14/6)=2 is even; the sign is +1.
a(8) = (6-8)(mod 6) = 4 because 8\6 = floor(8/6)=1 is odd; the sign is -1.
		

Crossrefs

Cf. A203571.

Programs

  • Mathematica
    PadRight[{},120,{0,1,2,3,4,5,0,5,4,3,2,1}] (* Harvey P. Dale, Nov 28 2015 *)

Formula

a(n) = n(mod 6) if (-1)^floor(n/6)=+1 else (6-n)(mod 6), n>=0. (-1)^floor(n/6) is the sign corresponding to the parity of the quotient floor(n/6). This quotient is sometimes denoted by n\6.
O.g.f.: x*(1+2*x+3*x^2+4*x^3+5*x^4+5*x^6+4*x^7+3*x^8+2*x^9+ x^10)/(1-x^12).