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!)
A078338 Let u(1)=u(2)=u(3)=1 and u(n)=(-1)^n*sign(u(n-1)-u(n-2))*u(n-3), then a(n)=sum(k=1,n,u(k)). 0
1, 2, 3, 3, 4, 5, 5, 4, 5, 5, 4, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 4, 5, 5, 4, 5, 5, 4, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 4, 5, 5, 4, 5, 5, 4, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 4, 5, 5, 4, 5, 5, 4, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 4, 5, 5, 4, 5, 5, 4, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 4, 5, 5, 4, 5, 5, 4, 3, 3, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, -1, 1).
FORMULA
Periodic with period 18.
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, -1, 1}, {1, 2, 3, 3, 4, 5, 5, 4, 5, 5}, 105] (* Ray Chandler, Aug 27 2015 *)
CROSSREFS
Sequence in context: A240153 A241435 A349320 * A338587 A338580 A278149
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 21 2002
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 April 19 07:38 EDT 2024. Contains 371782 sequences. (Running on oeis4.)