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.

A378959 Sum, in base 10, of the permutations of the digits of n, written in base 2.

Original entry on oeis.org

0, 1, 3, 3, 7, 14, 14, 7, 15, 45, 45, 45, 45, 45, 45, 15, 31, 124, 124, 186, 124, 186, 186, 124, 124, 186, 186, 124, 186, 124, 124, 31, 63, 315, 315, 630, 315, 630, 630, 630, 315, 630, 630, 630, 630, 630, 630, 315, 315, 630, 630, 630, 630, 630, 630, 315, 630
Offset: 0

Views

Author

Paolo P. Lava, Dec 12 2024

Keywords

Comments

Fixed points are in A000225.

Examples

			a(5) = 14 because 5 in base 2 is 101 and the permutations of the digits are 101, 110, 011 that correspond to 5, 6, 3 and 5 + 6 + 3 = 14.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local k, l;
          l:= convert(n, base, 2); k:= nops(l);
          binomial(k-1, add(i, i=l)-1)*(2^k-1)
        end:
    seq(a(n), n=0..56);  # Alois P. Heinz, Dec 12 2024
  • Mathematica
    A378959[n_] := (2^# - 1)*Binomial[# - 1, DigitCount[n, 2, 0]] & [BitLength[n]];
    Array[A378959, 100, 0] (* Paolo Xausa, Jan 29 2025 *)

Formula

a(n) = A003817(n) * A090706(n). - Alois P. Heinz, Dec 12 2024