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.

A328379 a(n) is the sum of the distinct numbers whose binary digits appear in order but not necessarily as consecutive digits in the binary representation of n.

This page as a plain text file.
%I A328379 #92 Dec 02 2019 03:46:31
%S A328379 0,1,3,4,7,11,12,11,15,24,31,29,28,37,33,26,31,49,66,61,71,92,85,67,
%T A328379 60,87,103,90,77,95,78,57,63,98,133,121,150,191,177,138,151,215,254,
%U A328379 219,197,240,199,145,124,185,237,210,235,293,262,199,165,230,263,223
%N A328379 a(n) is the sum of the distinct numbers whose binary digits appear in order but not necessarily as consecutive digits in the binary representation of n.
%H A328379 Rémy Sigrist, <a href="/A328379/b328379.txt">Table of n, a(n) for n = 0..16384</a>
%H A328379 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A328379 A078823(n) <= a(n).
%F A328379 a(2^k) = 2^(k+1)-1 for any k >= 0.
%F A328379 a(2^k-1) = A000295(k+1) for any k >= 0.
%e A328379 The first terms, alongside the binary representations of n as well as those of the numbers that appear in it, are:
%e A328379   n   a(n)  bin(n)  {bin(s)}
%e A328379   --  ----  ------  ----------------------------
%e A328379    0     0       0  {0}
%e A328379    1     1       1  {1}
%e A328379    2     3      10  {0, 1, 10}
%e A328379    3     4      11  {1, 11}
%e A328379    4     7     100  {0, 1, 10, 100}
%e A328379    5    11     101  {0, 1, 10, 11, 101}
%e A328379    6    12     110  {0, 1, 10, 11, 110}
%e A328379    7    11     111  {1, 11, 111}
%e A328379    8    15    1000  {0, 1, 10, 100, 1000}
%e A328379    9    24    1001  {0, 1, 10, 11, 100, 101, 1001}
%e A328379   10    31    1010  {0, 1, 10, 11, 100, 101, 110, 1010}
%o A328379 (PARI) a(n, base=2) = { my (b=digits(n, base), s=[0]); for (k=1, #b, s = setunion(s, apply(o -> base*o+b[k], s))); vecsum(s) }
%Y A328379 Cf. A000295, A078823, A329873.
%K A328379 nonn,base
%O A328379 0,3
%A A328379 _Rémy Sigrist_, Nov 30 2019