|
|
A181975
|
|
The sequence {1, 2, 3, 4, 5, 4, 3, 2} repeated.
|
|
1
|
|
|
1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
Table of n, a(n) for n=1..87.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,-1,1).
|
|
FORMULA
|
a(n) = abs(mod((n+3),8)-4)+1.
G.f.: (2+x+x^2+x^3+x^4)/((1-x)*(1+x^4)). - Charles R Greathouse IV, Apr 04 2012
|
|
MATHEMATICA
|
PadRight[{}, 120, {1, 2, 3, 4, 5, 4, 3, 2}] (* Harvey P. Dale, Oct 20 2015 *)
|
|
PROG
|
(PARI) a(n)=abs((n+3)%8-4)+1 \\ Charles R Greathouse IV, Apr 04 2012
|
|
CROSSREFS
|
Cf. A131974.
Sequence in context: A017880 A086144 A131974 * A062406 A271800 A073792
Adjacent sequences: A181972 A181973 A181974 * A181976 A181977 A181978
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
Steven Sund, Apr 04 2012
|
|
STATUS
|
approved
|
|
|
|