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-4 of 4 results.

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

A091893 Number of partitions of n into numbers having all the same number of 1's in binary representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 11, 13, 16, 17, 25, 23, 31, 35, 40, 42, 59, 53, 72, 79, 87, 91, 119, 114, 140, 151, 171, 178, 219, 203, 257, 275, 296, 319, 382, 364, 435, 467, 511, 533, 635, 609, 721, 764, 826, 865, 1011, 994, 1141, 1203, 1301, 1371, 1571, 1541, 1773
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 10 2004

Keywords

Examples

			n=30 -> '11110', a(30) = (#partitions into numbers with 1 binary 1) + (#partitions into numbers with 2 binary 1's) + (#partitions into numbers with 3 binary 1's) + (#partitions into numbers with 4 binary 1's) + (#partitions into numbers with 5 binary 1's) = A018819(30) + A091889(30) + A091890(30) + #{'11110','1111'+'1111'} + #empty = 166 + 50 + 1 + 2 + 0 = 219.
		

Crossrefs

Programs

A091892 Numbers k having only one partition into parts which are a sum of exactly as many distinct powers of 2 as there are 1's in the binary representation of k.

Original entry on oeis.org

0, 1, 3, 5, 7, 11, 13, 15, 19, 23, 27, 29, 31, 39, 43, 47, 51, 55, 59, 61, 63, 79, 87, 91, 95, 103, 107, 111, 115, 119, 123, 125, 127, 143, 159, 175, 183, 187, 191, 207, 215, 219, 223, 231, 235, 239, 243, 247, 251, 253, 255, 287, 303, 319, 335, 351, 367, 375, 379, 383, 399
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 10 2004

Keywords

Comments

All positive terms are odd. - Alois P. Heinz, Dec 12 2021
Conjecture: if the second leftmost bit in the binary expansion of k+1 equals 0, then k is a term if and only if A007814(k+1) >= 2^(f(k)-1) + f(k). Otherwise, k is a term if and only if A007814(k+1) >= 2^f(k). Here f(k) = A086784(k+1). - Mikhail Kurkov, Oct 03 2022

Examples

			From _David A. Corneth_, Oct 03 2022: (Start)
11 is in the sequence as numbers with 3 bits and are <= 11 are 7, 11. The only partition of 11 into parts of size 7 and 11 are 11.
9 is not in the sequence as numbers with 2 bits, like 9, are 3, 5, 6, 9. 9 can be partitioned as 3+3+3 = 3+6 = 9 into these parts. As these are 3 > 1 partitions, 9 is not here. (End)
		

Crossrefs

Programs

  • 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]]];
    okQ[k_] := If[k == 0, True, If[EvenQ[k], False, EulerT[Table[DigitCount[j, 2, 1] == DigitCount[k, 2, 1] // Boole, {j, 1, k}]][[k]] == 1]];
    Reap[For[k = 0, k <= 1000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Dec 17 2021 *)
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    upto(n)={Set(concat(vector(logint(n,2)+1, k, my(u=vector(n,i,hammingweight(i)==k), v=EulerT(u)); select(i->u[i]&&v[i]==1, [1..n], 1))))} \\ Andrew Howroyd, Apr 20 2021

Formula

A091891(a(n)) = 1.

Extensions

Terms a(40) and beyond from Andrew Howroyd, Apr 20 2021
a(1)=0 inserted by Alois P. Heinz, Dec 12 2021
Showing 1-4 of 4 results.