

A203572


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


2



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

This sequence can be continued periodically for negative values of n.
This is the sixth sequence of a kfamily of sequences P_k, k>=1, which starts with A000007(n+1), n>=0, (the 0sequence), 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).


LINKS

Table of n, a(n) for n=0..60.


FORMULA

a(n) = n(mod 6) if (1)^floor(n/6)=+1 else (6n)(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)/(1x^12).


EXAMPLE

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


MATHEMATICA

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


CROSSREFS

Cf. A203571.
Sequence in context: A309957 A220660 A257846 * A195829 A095874 A279385
Adjacent sequences: A203569 A203570 A203571 * A203573 A203574 A203575


KEYWORD

nonn,easy


AUTHOR

Wolfdieter Lang, Jan 12 2012


STATUS

approved



