The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A104156 a(1)=a(2)=0, a(n) = abs(2*a(n-1) - a(n-2)) - 1. 5
 0, 0, -1, 1, 2, 2, 1, -1, 2, 4, 5, 5, 4, 2, -1, 3, 6, 8, 9, 9, 8, 6, 3, -1, 4, 8, 11, 13, 14, 14, 13, 11, 8, 4, -1, 5, 10, 14, 17, 19, 20, 20, 19, 17, 14, 10, 5, -1, 6, 12, 17, 21, 24, 26, 27, 27, 26, 24, 21, 17, 12, 6, -1, 7, 14, 20, 25, 29, 32, 34, 35, 35, 34, 32, 29, 25, 20, 14, 7, -1, 8, 16, 23, 29, 34, 38, 41, 43, 44, 44, 43, 41, 38, 34, 29, 23 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS A jumping flea sequence. The n-th jump is starting at index n(n+2) and is ending at (n+1)(n+3). It reaches the altitude of n(n+3)/2 and can be given directly (omitting the -1's). For instance, for the 4th jump: start with 4, then add (4-0)=4 to 4 which gives 8, then add (4-1)=3 to 8 giving 8+3=11, then 11+(4-2)=13, then 13+(4-3)=14. By symmetry you get the complete 4th jump: {4,8,11,13,14,14,13,11,8,4}. LINKS FORMULA for any s>0 sum(k=s*(s+2), (s+1)*(s+3), a(k) )=1/3*(s+2)*(s+3)*(2*s-1)=2*A058373(s). a(n) = (1/2)*(n-1-f(n+2)^2) where f(n)=floor(1/2+sqrt(n))-abs{n-1-floor(1/2+sqrt(n))^2}. - Benoit Cloitre, Mar 17 2005 PROG (PARI) a(n)=if(n<3, 0, abs(2*a(n-1)-a(n-2))-1) CROSSREFS Sequence in context: A257543 A081372 A101489 * A070166 A131373 A245185 Adjacent sequences:  A104153 A104154 A104155 * A104157 A104158 A104159 KEYWORD sign AUTHOR Benoit Cloitre, Mar 09 2005 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.

Last modified August 3 13:49 EDT 2020. Contains 336198 sequences. (Running on oeis4.)