|
| |
|
|
A010875
|
|
Simple periodic sequence.
|
|
26
| |
|
|
0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,3
|
|
|
COMMENTS
| The rightmost digit in the base-6 representation of n. - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 11 2007
n^3 mod 6. [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Oct 29 2009]
|
|
|
LINKS
| Index to sequences with linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
|
|
|
FORMULA
| a(n)=n mod 6.
Complex representation: a(n)=1/6*(1-r^n)*sum{1<=k<6, k*product{1<=m<6,m<>k, (1-r^(n-m))}} where r=exp(pi/3*i)=(1+sqrt(3)*i)/2 and i=sqrt(-1).
Trigonometric representation: a(n)=(16/3)^2*(sin(n*pi/6))^2*sum{1<=k<6, k*product{1<=m<6,m<>k, (sin((n-m)*pi/6))^2}}.
G.f.: g(x)=(sum{1<=k<6, k*x^k})/(1-x^6).
Also: g(x)=x(5x^6-6x^5+1)/((1-x^6)(1-x)^2). - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), May 31 2007
a(n)=n mod 2+2*(floor(n/2)mod 3)=A000035(n)+2*A010872(A004526(n)).
Also: a(n)=n mod 3+3*(floor(n/3)mod 2)=A010872(n)+3*A000035(A002264(n)). - Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Jun 11 2007
a(n)=2.5-0.5*(-1)^n-cos(Pi*n/3)-3^0.5*sin(Pi*n/3)-cos(2*Pi*n/3)-3^0.5/3*sin(2*Pi*n/3) [From Richard Choulet (richardchoulet(AT)yahoo.fr), Dec 11 2008]
|
|
|
PROG
| (Other) sage: [power_mod(n, 3, 6 )for n in xrange(0, 81)] # [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Oct 29 2009]
(PARI) a(n)=n%6 \\ Charles R Greathouse IV, Dec 05 2011
|
|
|
CROSSREFS
| Partial sums: A130484. Other related sequences A130481, A130482, A130483, A130485.
Sequence in context: A037884 A030567 A049265 * A203572 A195829 A095874
Adjacent sequences: A010872 A010873 A010874 * A010876 A010877 A010878
|
|
|
KEYWORD
| nonn,easy
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
|
|
EXTENSIONS
| Formulas 1 to 7 re-edited for better readability by Hieronymus Fischer, Dec 05 2011
|
| |
|
|