A344339 a(n) is the minimal number of terms of A332520 that need to be combined with the bitwise OR operator in order to give n.
0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 1, 2, 2, 1, 2, 2, 3, 2, 2, 3, 2, 2, 2, 3, 3, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 1, 3
Offset: 0
Examples
For n = 32576: - the binary representation of 13170 is "111111101000000", - it has 15 bits, so we can take k = 4 (15 <= 2^4), - the corresponding 4-ary Boolean function f has the following truth table: CD\AB| 00 01 11 10 -----+---------------- 00| 0 0 1 1 01| 0 0 1 1 11| 0 0 0 1 10| 0 1 1 1 - we can express f as AC' + AB' + BCD' in optimal form, - so a(32576) = 3.
Links
- Rémy Sigrist, PARI program for A344339
- Wikipedia, Disjunctive normal form
- Wikipedia, Karnaugh map
Programs
-
PARI
See Links section.
Comments