|
|
A010874
|
|
a(n) = n mod 5.
|
|
54
|
|
|
0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Complex representation: a(n) = (1/5)*(1-r^n)*Sum{1<=k<5, k*Product{1<=m<5,m<>k, (1-r^(n-m))}} where r=exp(2*Pi/5*i) and i=sqrt(-1).
Trigonometric representation: a(n) = (16/5)^2*(sin(n*Pi/5))^2*Sum{1<=k<5, k*Product{1<=m<5,m<>k, (sin((n-m)*Pi/5))^2}}. Clearly, the squared terms may be replaced by their absolute values '|.|'. This formula can be easily adapted to represent any periodic sequence.
G.f.: also g(x) = x*(5*x^6 - 6*x^5 + 1)/((1-x^5)*(1-x)^2). - Hieronymus Fischer, Jun 01 2007
a(n) = -cos(4/5*Pi*n)-cos(2/5*Pi*n)+1/20*5^(1/2)*(10-2*5^(1/2))^(1/2)* sin(4/5*Pi*n)-1/4*(10-2*5^(1/2))^(1/2)*sin(4/5*Pi*n)-1/4*(10+2*5^(1/2))^(1/2)*sin(2/5*Pi*n)-1/20*5^(1/2)*(10+2*5^(1/2))^(1/2)*sin(2/5*Pi*n) + 2. - Leonid Bedratyuk, May 14 2012
a(n) = a(n-5) for n>4.
a(n) = 4*(1 - floor(n/5)) + Sum_{k=1..4} floor((n-k)/5).
a(n) = 4 - 4*floor(n/5) + floor((n-1)/5) + floor((n-2)/5) + floor((n-3)/5) + floor((n-4)/5).
a(n) = n - 5*floor(n/5). (End)
a(n) = 2 + (2/5)*Sum_{k=1..4} k*((cos(2*(n-k)*Pi/5) + cos(4*(n-k)*Pi/5)). - Wesley Ivan Hurt, Sep 27 2018
|
|
MAPLE
|
|
|
MATHEMATICA
|
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|