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.

A356899 Nonnegative numbers whose minimal and maximal tribonacci representations are the same.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 21, 22, 23, 28, 29, 30, 32, 33, 34, 35, 36, 39, 40, 41, 42, 43, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 66, 67, 72, 73, 74, 76, 77, 78, 79, 80, 96, 97, 98, 99, 100, 102, 103, 104, 109, 110, 111, 113
Offset: 1

Views

Author

Amiram Eldar, Sep 03 2022

Keywords

Crossrefs

A089068 is a subsequence.
Similar sequence: A000071 (numbers whose Zeckendorf and dual Zeckendorf representations are the same).

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]];
    tribmin[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]; FromDigits@IntegerDigits[Total[2^(s - 1)], 2]];
    tribmax[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, FromDigits[v[[i[[1, 1]] ;; -1]]]]];
    Select[Range[0, 150], tribmin[#] == tribmax[#] &]