cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A331854 #8 Jan 31 2020 16:05:40
%S A331854 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,
%T A331854 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,
%U A331854 6,7,7,11,10,12,10,12,11,12,10,14,10,13,11,11
%N 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.
%H A331854 Rémy Sigrist, <a href="/A331854/a331854.gp.txt">PARI program for A331854</a>
%H A331854 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A331854 a(2^k) = k+1 for any k >= 0.
%F A331854 a(2^k-1) = k for any k > 0.
%e A331854 For n = 6:
%e A331854 - the binary representation of 6 is "110",
%e A331854 - we can split it in 4 ways:
%e A331854       "110" -> 6
%e A331854       "1" and "10" -> 1 OR 2 = 3
%e A331854       "11" and "0" -> 3 OR 0 = 3
%e A331854       "1" and "1" and "0" -> 1 OR 1 OR 0 = 1
%e A331854 - we have 3 distinct values,
%e A331854 - hence a(6) = 3.
%o A331854 (PARI) See Links section.
%Y A331854 See A331851 for similar sequences.
%K A331854 nonn,base
%O A331854 0,3
%A A331854 _Rémy Sigrist_, Jan 29 2020