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.

Previous Showing 21-22 of 22 results.

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}]

A381957 If n = Sum 2^e(k), then a(n) = Sum 2^a(e(k)), with a(0) = 1.

Original entry on oeis.org

1, 2, 4, 6, 16, 18, 20, 22, 64, 66, 68, 70, 80, 82, 84, 86, 65536, 65538, 65540, 65542, 65552, 65554, 65556, 65558, 65600, 65602, 65604, 65606, 65616, 65618, 65620, 65622, 262144, 262146, 262148, 262150, 262160, 262162, 262164, 262166, 262208, 262210, 262212, 262214, 262224, 262226
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 11 2025

Keywords

Comments

Replace 2^k in the binary representation of n with 2^a(k).

Examples

			25 = 2^4 + 2^3 + 2^0, hence a(25) = 2^a(4) + 2^a(3) + 2^a(0) = 2^16 + 2^6 + 2^1 = 65602.
		

Crossrefs

Programs

  • Mathematica
    e[n_] := -1 + Position[Reverse[IntegerDigits[n, 2]], 1] // Flatten; a[0] = 1; a[n_] := a[n] = Total[2^a /@ e[n]]; Array[a, 50, 0] (* Amiram Eldar, Mar 11 2025 *)
  • PARI
    a(n) = if (n==0, 1, my(v=Vecrev(binary(n))); sum(k=1, #v, if (v[k], 2^a(k-1)))); \\ Michel Marcus, Mar 11 2025

Formula

G.f.: 1 + (1/(1 - x)) * Sum_{k>=0} 2^a(k) * x^(2^k) / (1 + x^(2^k)).
Previous Showing 21-22 of 22 results.