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.

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 *)

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.