login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A167380 a(1)=1, a(2)=2, and continued periodically with 4, 5, 1, -4, -5, -1 . 3
1, 2, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(1)=1. a(2)=2. a(6k-3)=4. a(6k-2)=5. a(6k-1)=1. a(6k)=-4. a(6k+1)=-5. a(6k+2)=-1.
From R. J. Mathar, Nov 03 2009: (Start)
a(n) = a(n-1) - a(n-2), n > 4.
G.f.: x*(1+x)*(3*x^2+1)/(1-x+x^2). (End)
MAPLE
A167380 := proc(n) if n <= 2 then n; else op(1+ (n mod 6), [-4, -5, -1, 4, 5, 1]) ; end if; end proc: seq(A167380(n), n=1..120) ; # R. J. Mathar, Nov 02 2009
MATHEMATICA
PadRight[{1, 2}, 120, {-5, -1, 4, 5, 1, -4}] (* or *) Join[{1, 2}, LinearRecurrence[ {1, -1}, {4, 5}, 120]] (* Harvey P. Dale, Mar 08 2015 *)
CROSSREFS
Sequence in context: A225153 A360108 A308319 * A242613 A196548 A359720
KEYWORD
sign,easy
AUTHOR
Jamel Ghanouchi, Nov 02 2009
EXTENSIONS
Unrelated material removed, and values corrected according to definition, by R. J. Mathar, Nov 05 2009
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 08:46 EDT 2024. Contains 371267 sequences. (Running on oeis4.)