A366601 a(0) = 0. For a(n-1) a novel term a(n) = a(A025480(a(n-1))), and if a(n-1) has occurred k (>1) times, a(n) = k-1 (the number of repetitions of a(n-1) in all prior terms).
0, 0, 1, 0, 2, 0, 3, 0, 4, 1, 1, 2, 1, 3, 1, 4, 1, 5, 0, 5, 1, 6, 0, 6, 1, 7, 0, 7, 1, 8, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 1, 9, 1, 10, 0, 8, 2, 9, 1, 11, 0, 9, 2, 10, 1, 12, 3, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 3, 10, 2, 11, 1, 13, 0, 10, 3, 11, 2, 12, 1, 14, 0
Offset: 0
Keywords
Examples
a(0) = 0 is a novel term, therefore a(1) = a(A025480(0)) = a(0) = 0. Since 0 has now been repeated once, a(2) = 1, another novel term, so a(3) = a(A025480(a(2))) = a(A025480(1)) = a(0) = 0. Now 0 has been repeated 2 times, so a(4) = 2. The data can be shown as an irregular table in which each row begins with a record term: 0,0; 1,0; 2,0; 3,0; 4,1,1,2,1,3,1,4,1; 5,0,5,1; 6,0,6,1; 7,0,7,1; 8,2,2,3,2,4,2,5,2,6,2,7,2,8,1;
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10000
- Michael De Vlieger, Scatterplot of a(n), n = 1..2^16.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
Programs
-
Mathematica
nn = 120; f[x_] := Floor[x/2^IntegerExponent[2 (x + 1), 2]]; a[0] = 0; c[_] := 0; Do[a[n] = If[c[#] == 0, c[#]++; a[f[#]], c[#]++; c[#] - 1] &[a[n - 1]], {n, nn}]; Array[a, nn, 0]
Comments