The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A331854 a(n) is the number of distinct values obtained by partitioning the binary representation of n into consecutive blocks, and then applying the bitwise OR operator to the numbers represented by the blocks. 2
 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 4, 5, 5, 4, 4, 5, 5, 7, 6, 7, 6, 7, 6, 7, 7, 8, 7, 7, 7, 5, 5, 6, 6, 9, 8, 9, 7, 9, 8, 9, 8, 9, 7, 10, 9, 9, 8, 9, 9, 11, 10, 10, 9, 11, 10, 11, 11, 11, 10, 9, 9, 6, 6, 7, 7, 11, 10, 12, 10, 12, 11, 12, 10, 14, 10, 13, 11, 11 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Table of n, a(n) for n=0..78. Rémy Sigrist, PARI program for A331854 Index entries for sequences related to binary expansion of n FORMULA a(2^k) = k+1 for any k >= 0. a(2^k-1) = k for any k > 0. EXAMPLE For n = 6: - the binary representation of 6 is "110", - we can split it in 4 ways: "110" -> 6 "1" and "10" -> 1 OR 2 = 3 "11" and "0" -> 3 OR 0 = 3 "1" and "1" and "0" -> 1 OR 1 OR 0 = 1 - we have 3 distinct values, - hence a(6) = 3. PROG (PARI) See Links section. CROSSREFS See A331851 for similar sequences. Sequence in context: A156251 A116458 A354166 * A093875 A329242 A266193 Adjacent sequences: A331851 A331852 A331853 * A331855 A331856 A331857 KEYWORD nonn,base AUTHOR Rémy Sigrist, Jan 29 2020 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.

Last modified April 14 20:39 EDT 2024. Contains 371667 sequences. (Running on oeis4.)