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!)
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. 2
0, 1, 3, 4, 7, 11, 12, 11, 15, 24, 31, 29, 28, 37, 33, 26, 31, 49, 66, 61, 71, 92, 85, 67, 60, 87, 103, 90, 77, 95, 78, 57, 63, 98, 133, 121, 150, 191, 177, 138, 151, 215, 254, 219, 197, 240, 199, 145, 124, 185, 237, 210, 235, 293, 262, 199, 165, 230, 263, 223 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
A078823(n) <= a(n).
a(2^k) = 2^(k+1)-1 for any k >= 0.
a(2^k-1) = A000295(k+1) for any k >= 0.
EXAMPLE
The first terms, alongside the binary representations of n as well as those of the numbers that appear in it, are:
n a(n) bin(n) {bin(s)}
-- ---- ------ ----------------------------
0 0 0 {0}
1 1 1 {1}
2 3 10 {0, 1, 10}
3 4 11 {1, 11}
4 7 100 {0, 1, 10, 100}
5 11 101 {0, 1, 10, 11, 101}
6 12 110 {0, 1, 10, 11, 110}
7 11 111 {1, 11, 111}
8 15 1000 {0, 1, 10, 100, 1000}
9 24 1001 {0, 1, 10, 11, 100, 101, 1001}
10 31 1010 {0, 1, 10, 11, 100, 101, 110, 1010}
PROG
(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) }
CROSSREFS
Sequence in context: A219188 A283428 A185506 * A080591 A291063 A047543
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 30 2019
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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)