The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356899 Nonnegative numbers whose minimal and maximal tribonacci representations are the same. 2

%I #8 Sep 05 2022 05:24:42

%S 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 35,36,39,40,41,42,43,52,53,54,55,56,59,60,61,62,63,65,66,67,72,73,74,

%U 76,77,78,79,80,96,97,98,99,100,102,103,104,109,110,111,113

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

%H Amiram Eldar, <a href="/A356899/b356899.txt">Table of n, a(n) for n = 1..10000</a>

%t t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3];

%t 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 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 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 Select[Range[0, 150], tribmin[#] == tribmax[#] &]

%Y Cf. A278038, A352103.

%Y A089068 is a subsequence.

%Y Similar sequence: A000071 (numbers whose Zeckendorf and dual Zeckendorf representations are the same).

%K nonn,base

%O 1,3

%A _Amiram Eldar_, Sep 03 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 12:26 EDT 2024. Contains 372600 sequences. (Running on oeis4.)