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.

Showing 1-3 of 3 results.

A091889 Number of partitions of n into sums of exactly two distinct powers of 2.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 2, 2, 5, 2, 3, 8, 4, 6, 12, 6, 11, 16, 11, 16, 24, 17, 23, 34, 26, 35, 50, 35, 50, 67, 55, 72, 93, 76, 99, 126, 112, 135, 171, 150, 186, 229, 210, 249, 304, 280, 336, 398, 380, 443, 526, 499, 584, 680, 665, 759, 886, 858, 985, 1136, 1123
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 10 2004

Keywords

Examples

			a(9)=3: 9 = (2^3+2^0) = (2^2+2^1)+(2^1+2^0) = (2^1+2^0)+(2^1+2^0)+(2^1+2^0).
		

Crossrefs

Programs

  • Mathematica
    With[{max = 64}, m = Select[Range[max], DigitCount[#, 2, 1] == 2 &]; a[n_] := Length@ IntegerPartitions[n, n, m]; Array[a, max]] (* Amiram Eldar, Aug 01 2023 *)

A091890 Number of partitions of n into sums of exactly three distinct powers of 2.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 1, 1, 1, 3, 2, 0, 1, 3, 3, 2, 5, 2, 1, 1, 5, 6, 3, 9, 5, 4, 5, 10, 9, 8, 13, 8, 10, 8, 16, 17, 15, 22, 18, 18, 20, 25, 28, 27, 34, 31, 32, 33, 44, 49, 44, 64, 53, 56, 61, 71, 77, 77, 100, 88, 94, 99, 123, 125, 132, 162, 147, 154
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 10 2004

Keywords

Examples

			a(14)=2: 14 = (2^3+2^2+2^1) = (2^2+2^1+2^0)+(2^2+2^1+2^0).
		

Crossrefs

Programs

  • Mathematica
    With[{max = 80}, m = Select[Range[max], DigitCount[#, 2, 1] == 3 &]; a[n_] := Length@ IntegerPartitions[n, n, m]; Array[a, max]] (* Amiram Eldar, Aug 01 2023 *)

A091891 Number of partitions of n into parts which are a sum of exactly as many distinct powers of 2 as n has 1's in its binary representation.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 2, 1, 10, 3, 2, 1, 5, 1, 2, 1, 36, 6, 12, 1, 11, 3, 2, 1, 24, 3, 3, 1, 5, 1, 2, 1, 202, 67, 55, 9, 93, 4, 5, 1, 112, 8, 13, 1, 10, 3, 2, 1, 304, 22, 18, 1, 20, 3, 3, 1, 34, 3, 3, 1, 5, 1, 2, 1, 1828, 1267, 1456, 71, 1629, 77, 100, 2, 2342, 99, 123, 9, 132, 4, 3, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 10 2004

Keywords

Examples

			a(9) = 3 because there are 3 partitions of 9 into parts of size 3, 5, 6, 9 which are the numbers that have two 1's in their binary representations. The 3 partitions are: 9, 6 + 3 and 3 + 3 + 3. - _Andrew Howroyd_, Apr 20 2021
		

Crossrefs

Programs

  • Maple
    H:= proc(n) option remember; add(i, i=Bits[Split](n)) end:
    v:= proc(n, k) option remember; `if`(n<1, 0,
          `if`(H(n)=k, n, v(n-1, k)))
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, v(i-1, k), k)+b(n-i, v(min(n-i, i), k), k)))
        end:
    a:= n-> b(n$2, H(n)):
    seq(a(n), n=0..80);  # Alois P. Heinz, Dec 12 2021
  • Mathematica
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}] b[n - j], {j, 1, n}]/n]; b];
    EulerT[v_List] := With[{q = etr[v[[#]]&]}, q /@ Range[Length[v]]];
    a[n_] := EulerT[Table[DigitCount[k, 2, 1] == DigitCount[n, 2, 1] // Boole, {k, 1, n}]][[n]];
    Array[a, 100] (* Jean-François Alcover, Dec 12 2021, after Andrew Howroyd *)
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    a(n) = {EulerT(vector(n,k,hammingweight(k)==hammingweight(n)))[n]} \\ Andrew Howroyd, Apr 20 2021

Formula

a(A000079(n)) = A018819(n);
a(A018900(n)) = A091889(n);
a(A014311(n)) = A091890(n);
a(A091892(n)) = 1.

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 12 2021
Showing 1-3 of 3 results.