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.

A326032 a(2^x + ... + 2^z) = w(x) + ... + w(z), where x...z are distinct nonnegative integers and w = A000120.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 3, 3, 4, 4, 4, 4, 5
Offset: 0

Views

Author

Gus Wiseman, Jul 22 2019

Keywords

Comments

From Robert Israel, Jul 23 2019: (Start)
a(2*n+1)=a(2*n).
a(n)=1 if and only if n > 1 is in A283526. (End)

Examples

			For example, a(6) = a(2^2 + 2^1) = w(2) + w(1) = 2.
		

Crossrefs

Other sequences that are built by replacing 2^k in the binary representation with other numbers: A022290 (Fibonacci), A059590 (factorials), A073642, A089625 (primes), A116549, A326031.

Programs

  • Maple
    Bwt:= proc(n) option remember; convert(convert(n,base,2),`+`) end proc:
    f:= proc(n) local L,i;
      L:= convert(n,base,2);
      add(L[i]*Bwt(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 23 2019
  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Total[Length/@bpe/@(bpe[n]-1)],{n,0,100}]