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!)
 A291598 a(n) = log_2(A281130(n)). 5
 0, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 3, 4, 4, 5, 2, 3, 4, 2, 3, 3, 4, 2, 3, 2, 3, 4, 4, 5, 4, 5, 3, 4, 3, 4, 2, 3, 5, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 2, 3, 4, 4, 5, 3, 4, 2, 3, 2, 3, 4, 4, 5, 4, 5, 3, 4, 3, 4, 4, 5, 5, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,7 LINKS Rok Cestnik, Table of n, a(n) for n = 1..10000 Rok Cestnik, Self-referencing visualization Rok Cestnik, Digit probability distributions MATHEMATICA a[n_] := a[n] = If[a[n - 2] < a[n - 1], a[n - 1 - a[n - 1]], 2 a[n - 1]]; a[1] = a[2] = 1; Array[Log2@ a@ # &, 105] (* Michael De Vlieger, Aug 29 2017 *) PROG (C) #include #include #include int main(void){    int N = 100;    int *a = (int*)malloc((N+1)*sizeof(int));    printf("1 0\n2 0\n");    a[1] = 0;    a[2] = 0;    for(int i = 2; i < N; ++i){       if(a[i-1] < a[i]) a[i+1] = a[i-int(pow(2, a[i]))];       else a[i+1] = a[i]+1;       printf("%d %d\n", i+1, a[i+1]);    }    return 0; } CROSSREFS Cf. A281130, A281131. Sequence in context: A097848 A308964 A124830 * A287820 A191373 A322873 Adjacent sequences:  A291595 A291596 A291597 * A291599 A291600 A291601 KEYWORD nonn AUTHOR Rok Cestnik, Aug 27 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.

Last modified April 18 19:31 EDT 2021. Contains 343089 sequences. (Running on oeis4.)