login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 3 03:03 EST 2021. Contains 341756 sequences. (Running on oeis4.)