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!)
A352104 a(n) is the number of 1's in the maximal tribonacci representation of n (A352103). 9
0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 3, 2, 3, 3, 4, 2, 3, 2, 3, 3, 4, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 3, 4, 3, 4, 4, 5, 3, 4, 3, 4, 4, 5, 4, 4, 5, 4, 5, 5, 6, 3, 3, 4, 3, 4, 4, 5, 3, 4, 3, 4, 4, 5, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 4, 5, 4, 5, 5, 6, 4, 5, 4, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
a(n) = A007953(A352103(n)).
a(n) >= A278043(n).
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]]; a[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, Total[v[[i[[1, 1]] ;; -1]]]]]; Array[a, 100, 0]
CROSSREFS
Similar sequences: A000120, A007895, A112310, A278043.
Sequence in context: A096004 A193495 A071068 * A240872 A328806 A326370
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 05 2022
STATUS
approved

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 April 18 04:56 EDT 2024. Contains 371767 sequences. (Running on oeis4.)