cp's OEIS Frontend

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.

A356896 Nonnegative numbers whose maximal tribonacci representation (A352103) ends in an even number of 1's.

This page as a plain text file.
%I A356896 #8 Sep 05 2022 05:24:46
%S A356896 0,2,3,4,6,9,10,11,13,14,15,16,17,19,22,23,24,26,28,30,33,34,35,37,38,
%T A356896 39,40,41,43,46,47,48,50,51,53,54,55,57,58,59,60,61,63,66,67,68,70,72,
%U A356896 74,77,78,79,81,82,83,84,85,87,90,91,92,94,96,97,98,100,103
%N A356896 Nonnegative numbers whose maximal tribonacci representation (A352103) ends in an even number of 1's.
%C A356896 Numbers k such that A356898(k) is even.
%C A356896 The asymptotic density of this sequence is c/(c+1) = 0.647798..., where c = 1.839286... (A058265) is the tribonacci constant.
%H A356896 Amiram Eldar, <a href="/A356896/b356896.txt">Table of n, a(n) for n = 1..10000</a>
%e A356896    n  a(n)  A352103(n)  A356898(n)
%e A356896    -  ----  ----------  ----------
%e A356896    1     0           0          0
%e A356896    2     2          10          0
%e A356896    3     3          11          2
%e A356896    4     4         100          0
%e A356896    5     6         110          0
%e A356896    6     9        1010          0
%e A356896    7    10        1011          2
%e A356896    8    11        1100          0
%e A356896    9    13        1110          0
%e A356896   10    14        1111          4
%t A356896 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]; c[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]]; Select[Range[0, 100], EvenQ[c[#]] &]
%Y A356896 Complement of A356897.
%Y A356896 Cf. A058265, A352103, A356898.
%Y A356896 Similar sequences: A308197, A342051.
%K A356896 nonn,base
%O A356896 1,2
%A A356896 _Amiram Eldar_, Sep 03 2022