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.

Original entry on oeis.org

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, 39, 40, 41, 43, 46, 47, 48, 50, 51, 53, 54, 55, 57, 58, 59, 60, 61, 63, 66, 67, 68, 70, 72, 74, 77, 78, 79, 81, 82, 83, 84, 85, 87, 90, 91, 92, 94, 96, 97, 98, 100, 103
Offset: 1

Views

Author

Amiram Eldar, Sep 03 2022

Keywords

Comments

Numbers k such that A356898(k) is even.
The asymptotic density of this sequence is c/(c+1) = 0.647798..., where c = 1.839286... (A058265) is the tribonacci constant.

Examples

			   n  a(n)  A352103(n)  A356898(n)
   -  ----  ----------  ----------
   1     0           0          0
   2     2          10          0
   3     3          11          2
   4     4         100          0
   5     6         110          0
   6     9        1010          0
   7    10        1011          2
   8    11        1100          0
   9    13        1110          0
  10    14        1111          4
		

Crossrefs

Complement of A356897.
Similar sequences: A308197, A342051.

Programs

  • Mathematica
    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[#]] &]