login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

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

%S 1,5,7,8,12,18,20,21,25,27,29,31,32,36,42,44,45,49,52,56,62,64,65,69,

%T 71,73,75,76,80,86,88,89,93,95,99,101,102,106,108,110,112,113,117,123,

%U 125,126,130,133,137,143,145,146,150,152,154,156,157,161,167,169

%N Nonnegative numbers whose maximal tribonacci representation (A352103) ends in an odd number of 1's.

%C Numbers k such that A356898(k) is odd.

%C The asymptotic density of this sequence is 1/(c+1) = 0.352201..., where c = 1.839286... (A058265) is the tribonacci constant.

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

%e n a(n) A352103(n) A356898(n)

%e - ---- ---------- ----------

%e 1 1 1 1

%e 2 5 101 1

%e 3 7 111 3

%e 4 8 1001 1

%e 5 12 1101 1

%e 6 18 10101 1

%e 7 20 10111 3

%e 8 21 11001 1

%e 9 25 11101 1

%e 10 27 11111 5

%t 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, 200], OddQ[c[#]] &]

%Y Complement of A356896.

%Y Cf. A058265, A352103, A356898.

%Y Similar sequences: A001950, A308198, A342050.

%K nonn,base

%O 1,2

%A _Amiram Eldar_, Sep 03 2022