login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A119558 a(1)=0,a(2)=0,a(3)=1 then a(n)=abs(a(n-1)-a(n-2))+(-1)^n*a(n-3). 1
0, 0, 1, 1, 0, 2, 1, 1, -2, 4, 5, -1, 2, 8, 7, 3, -4, 14, 15, -3, 4, 22, 21, 5, -6, 32, 33, -5, 6, 44, 43, 7, -8, 58, 59, -7, 8, 74, 73, 9, -10, 92, 93, -9, 10, 112, 111, 11, -12, 134, 135, -11, 12, 158, 157, 13, -14, 184, 185, -13, 14, 212, 211, 15, -16, 242, 243, -15, 16, 274, 273, 17, -18, 308, 309, -17, 18, 344 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

See A104156 for an order 2 example.

REFERENCES

B. Cloitre, On strange predictible recursions, preprint 2006

LINKS

Table of n, a(n) for n=0..77.

FORMULA

for n>=1 a(4n)=(-1)^n*(2*floor(n/2)-1), a(4*n+1)=(-1)^(n+1)*2*floor(n/2), a(4*n+2)=n^2-n+2, a(4*n+3)=n^2-n+2+(-1)^n

CROSSREFS

Sequence in context: A253473 A026120 A108746 * A210112 A024735 A024957

Adjacent sequences:  A119555 A119556 A119557 * A119559 A119560 A119561

KEYWORD

sign

AUTHOR

Benoit Cloitre, May 30 2006

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 18 09:17 EST 2017. Contains 294879 sequences.