This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A356898 #8 Sep 05 2022 05:24:39 %S A356898 0,1,0,2,0,1,0,3,1,0,2,0,1,0,4,0,2,0,1,0,3,1,0,2,0,1,0,5,0,1,0,3,1,0, %T A356898 2,0,1,0,4,0,2,0,1,0,3,1,0,2,0,1,0,6,1,0,2,0,1,0,4,0,2,0,1,0,3,1,0,2, %U A356898 0,1,0,5,0,1,0,3,1,0,2,0,1,0,4,0,2,0,1 %N A356898 a(n) is the number of trailing 1's in the maximal tribonacci representation of n (A352103). %C A356898 The asymptotic density of the occurrences of k = 0, 1, 2, ... is (c-1)/c^(k+1), where c = 1.839286... (A058265) is the tribonacci constant. %C A356898 The asymptotic mean of this sequence is 1/(c-1) = 1.191487... %H A356898 Amiram Eldar, <a href="/A356898/b356898.txt">Table of n, a(n) for n = 0..10000</a> %e A356898 n a(n) A352103(n) %e A356898 - ---- ---------- %e A356898 0 0 0 %e A356898 1 1 1 %e A356898 2 0 10 %e A356898 3 2 11 %e A356898 4 0 100 %e A356898 5 1 101 %e A356898 6 0 110 %e A356898 7 3 111 %e A356898 8 1 1001 %e A356898 9 0 1010 %t A356898 t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; trib[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; IntegerDigits[Total[2^(s - 1)], 2]]; f[v_] := Module[{m = Length[v], k}, k = m; While[v[[k]] == 1, k--]; m - k]; a[n_] := Module[{v = trib[n]}, nv = Length[v]; i = 1; While[i <= nv - 3, If[v[[i ;; i + 3]] == {1, 0, 0, 0}, v[[i ;; i + 3]] = {0, 1, 1, 1}; If[i > 3, i -= 4]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, f[v[[i[[1, 1]] ;; -1]]], 10]]; Array[a, 100, 0] %Y A356898 Cf. A058265, A352103, A356896, A356897. %Y A356898 Similar sequences: A278045, A356749. %K A356898 nonn,base %O A356898 0,4 %A A356898 _Amiram Eldar_, Sep 03 2022