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!)
A116575 a(0) = 0; a(1) = a(2) = 1; for n > 2: a(n) = a(a(n-2)) + a(n-1 - abs(a(n-1) - a(n-2))) if a(n-2) < n, a(n) = 0 otherwise. 0
0, 1, 1, 2, 2, 3, 3, 5, 5, 8, 6, 10, 8, 12, 13, 20, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

"Limited chaotic sequence" based on A005229.

a(n) = 0 for n > 16.

LINKS

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

MATHEMATICA

a[0] = 0; a[1] = a[2] = 1; a[n_] := a[n] = If[a[n - 2] < n, a[a[n - 2]] + a[n - 1 - Abs[a[n - 1] - a[n - 2]]], 0]; Array[a, 32, 0] (* JungHwan Min, Jan 14 2017 *)

PROG

(PARI) M(n)=v[n+1] {m=32; v=vector(m+1); v[1]=0; v[2]=1; v[3]=1; for(n=3, m, c=M(n-2); v[n+1]=if(c<n, M(c)+M(n-1-abs(M(n-1)-c)), 0)); for(j=0, m, print1(M(j), ", "))}

CROSSREFS

Cf. A005229.

Sequence in context: A140829 A184324 A274168 * A244800 A275972 A090492

Adjacent sequences:  A116572 A116573 A116574 * A116576 A116577 A116578

KEYWORD

nonn,fini,full,less

AUTHOR

Roger L. Bagula, Mar 19 2006

EXTENSIONS

Edited by N. J. A. Sloane, Apr 10 2006 and Apr 16 2006

Definition corrected by JungHwan Min, Jan 14 2017

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 July 5 01:46 EDT 2020. Contains 335457 sequences. (Running on oeis4.)