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!)
A341839 Square array T(n, k), n, k >= 0, read by antidiagonals; for any number m with runs in binary expansion (r_1, ..., r_j), let R(m) = {r_1 + ... + r_j, r_2 + ... + r_j, ..., r_j}; T(n, k) is the unique number t such that R(t) is the union of R(n) and of R(k). 3
0, 1, 1, 2, 1, 2, 3, 2, 2, 3, 4, 2, 2, 2, 4, 5, 5, 2, 2, 5, 5, 6, 5, 5, 3, 5, 5, 6, 7, 6, 5, 4, 4, 5, 6, 7, 8, 6, 5, 5, 4, 5, 5, 6, 8, 9, 9, 5, 5, 5, 5, 5, 5, 9, 9, 10, 9, 10, 4, 5, 5, 5, 4, 10, 9, 10, 11, 10, 10, 11, 4, 5, 5, 4, 11, 10, 10, 11, 12, 10, 10, 10, 11, 5, 6, 5, 11, 10, 10, 10, 12 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
For any m > 0, R(m) contains the partial sums of the m-th row of A227736; by convention, R(0) = {}.
The underlying idea is to break in an optimal way the runs in binary expansions of n and of k so that they match, hence the relationship with A003188.
LINKS
FORMULA
T(n, k) = T(k, n)
T(m, T(n, k)) = T(T(m, n), k).
T(n, n) = n.
T(n, 0) = 0.
A070939(T(n, k)) = max(A070939(n), A070939(k)).
A003188(T(n, k)) = A003188(n) OR A003188(k) (where OR denotes the bitwise OR operator).
T(n, 1) = A042963(ceiling((n+1)/2)).
EXAMPLE
Array T(n, k) begins:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
---+-----------------------------------------------------------------
0| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1| 1 1 2 2 5 5 6 6 9 9 10 10 13 13 14 14
2| 2 2 2 2 5 5 5 5 10 10 10 10 13 13 13 13
3| 3 2 2 3 4 5 5 4 11 10 10 11 12 13 13 12
4| 4 5 5 4 4 5 5 4 11 10 10 11 11 10 10 11
5| 5 5 5 5 5 5 5 5 10 10 10 10 10 10 10 10
6| 6 6 5 5 5 5 6 6 9 9 10 10 10 10 9 9
7| 7 6 5 4 4 5 6 7 8 9 10 11 11 10 9 8
8| 8 9 10 11 11 10 9 8 8 9 10 11 11 10 9 8
9| 9 9 10 10 10 10 9 9 9 9 10 10 10 10 9 9
10| 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
11| 11 10 10 11 11 10 10 11 11 10 10 11 11 10 10 11
12| 12 13 13 12 11 10 10 11 11 10 10 11 12 13 13 12
13| 13 13 13 13 10 10 10 10 10 10 10 10 13 13 13 13
14| 14 14 13 13 10 10 9 9 9 9 10 10 13 13 14 14
15| 15 14 13 12 11 10 9 8 8 9 10 11 12 13 14 15
PROG
(PARI) T(n, k) = { my (r=[], v=0); while (n||k, my (w=min(valuation(n+n%2, 2), valuation(k+k%2, 2))); r=concat(w, r); n\=2^w; k\=2^w); for (k=1, #r, v=(v+k%2)*2^r[k]-k%2); v }
CROSSREFS
Sequence in context: A049819 A284566 A079056 * A366509 A231205 A003984
KEYWORD
nonn,base,tabl
AUTHOR
Rémy Sigrist, Feb 21 2021
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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)