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!)
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. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
COMMENTS
This sequence is related to Karnaugh maps:
- for any number n with up to 2^k binary digits (possibly with leading zeros),
- we can interpret the binary expansion of n as a truth table for a k-ary Boolean function f,
- a(n) gives the optimal number of products in a disjunctive normal form for f.
LINKS
Wikipedia, Karnaugh map
FORMULA
a(n) = 1 iff n > 0 and n belongs to A332520.
a(n) <= A000120(n).
a(A001196(n)) = a(n).
EXAMPLE
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.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A052005 A346707 A138702 * A348364 A279620 A278109
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 15 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 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)