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

 

Logo


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<stdio.h>

#include<stdlib.h>

#include<math.h>

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: A106698 A097848 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 04:37 EDT 2019. Contains 328247 sequences. (Running on oeis4.)