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.

This page as a plain text file.
%I A356899 #8 Sep 05 2022 05:24:42
%S A356899 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,
%T A356899 35,36,39,40,41,42,43,52,53,54,55,56,59,60,61,62,63,65,66,67,72,73,74,
%U A356899 76,77,78,79,80,96,97,98,99,100,102,103,104,109,110,111,113
%N A356899 Nonnegative numbers whose minimal and maximal tribonacci representations are the same.
%H A356899 Amiram Eldar, <a href="/A356899/b356899.txt">Table of n, a(n) for n = 1..10000</a>
%t A356899 t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3];
%t A356899 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]];
%t A356899 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]];
%t A356899 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]]]]];
%t A356899 Select[Range[0, 150], tribmin[#] == tribmax[#] &]
%Y A356899 Cf. A278038, A352103.
%Y A356899 A089068 is a subsequence.
%Y A356899 Similar sequence: A000071 (numbers whose Zeckendorf and dual Zeckendorf representations are the same).
%K A356899 nonn,base
%O A356899 1,3
%A A356899 _Amiram Eldar_, Sep 03 2022