|
|
A010877
|
|
a(n) = n mod 8.
|
|
37
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
The rightmost digit in the base-8 representation of n. Also, the equivalent value of the three rightmost digits in the base-2 representation of n. - Hieronymus Fischer, Jun 12 2007
|
|
LINKS
|
|
|
FORMULA
|
Complex representation: a(n) = (1/8)*(1-r^n)*Sum_{k=1..7} k*Product_{m=1..7, m<>k} (1 - r^(n-m)) where r = exp(Pi/4*i) = (1+i)*sqrt(2)/2 and i=sqrt(-1).
Trigonometric representation: a(n) = 256*(sin(n*Pi/8))^2*Sum_{k=1..7} k*Product_{m=1..7, m<>k} (sin((n-m)*Pi/8))^2.
G.f.: g(x) = (Sum_{k=1..7}, k*x^k)/(1-x^8).
a(n) = (1/2)*(7 - (-1)^n - 2*(-1)^(b/4) - 4*(-1)^((b - 2 + 2*(-1)^(b/4))/8)) where b = 2n - 1 + (-1)^n. - Hieronymus Fischer, Jun 12 2007
General formula for period 2^k: a(n) = (1/2)*(2^k - 1 - Sum_{j=0..k-1} 2^j*(-1)^p(j,n)) where p(j,n) is defined recursively by p(0,n)=n, p(j,n) = (1/4)*(2*p(j-1,n) - 1 + (-1)^p(j-1,n)). - Hieronymus Fischer, Jun 14 2007
|
|
MATHEMATICA
|
|
|
PROG
|
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|