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 11-20 of 47 results. Next

A211857 Number of representations of n as a sum of products of distinct pairs of integers larger than 1, considered to be equivalent when terms or factors are reordered.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 3, 1, 3, 2, 5, 1, 7, 3, 8, 5, 11, 4, 16, 9, 17, 12, 25, 13, 34, 20, 37, 28, 53, 32, 69, 46, 78, 63, 108, 71, 136, 100, 160, 134, 210, 152, 265, 211, 313, 268, 403, 316, 506, 421, 596, 528, 759, 629, 943, 814, 1111, 1016
Offset: 0

Views

Author

Alois P. Heinz, Apr 22 2012

Keywords

Examples

			a(0) = 1: 0 = the empty sum.
a(1) = a(2) = a(3) = 0: no product is < 4.
a(4) = 1: 4 = 2*2.
a(6) = 1: 6 = 2*3.
a(8) = 1: 8 = 2*4.
a(9) = 1: 9 = 3*3.
a(10) = 2: 10 = 2*2 + 2*3 = 2*5.
a(12) = 3: 12 = 2*2 + 2*4 = 2*6 = 3*4.
a(16) = 5: 16 = 2*2 + 2*6 = 2*2 + 3*4 = 2*3 + 2*5 = 2*8 = 4*4.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; local c;
          c:= ceil(tau(i)/2)-1;
          `if`(n=0, 1, `if`(i<2, 0, b(n, i-1)
           +add(b(n-i*j, i-1) *binomial(c, j), j=1..min(c, n/i))))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..70);
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{c}, c = Ceiling[DivisorSigma[0, i]/2]-1; If[n==0, 1, If[i<2, 0, b[n, i-1]+Sum[b[n-i*j, i-1]*Binomial[c, j], {j, 1, Min[c, n/i]}]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Feb 19 2017, translated from Maple *)

Formula

G.f.: Product_{k>0} (1+x^k)^(A038548(k)-1). - Vaclav Kotesovec, Aug 19 2019
G.f.: Product_{i>=1} Product_{j=2..i} (1 + x^(i*j)). - Ilya Gutkovskiy, Sep 23 2019

A319850 Number of distinct positive integers that can be obtained, starting with the initial interval partition (1, ..., n), by iteratively adding or multiplying together parts until only one part remains.

Original entry on oeis.org

1, 2, 5, 21, 94, 446, 2287, 12568, 78509
Offset: 1

Views

Author

Gus Wiseman, Sep 29 2018

Keywords

Examples

			The n-th row lists all integers that can be obtained starting with (1, ..., n):
  1
  2 3
  5 6 7 8 9
  9 10 11 12 13 14 15 16 17 18 19 20 21 24 25 26 27 28 30 32 36
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    Table[Length[Select[ReplaceListRepeated[{Range[n]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]],{n,6}]

A212214 Number of representations of n as a sum of products of pairs of positive integers, n = Sum_{k=1..m} i_k*j_k with i_k<=j_k, i_k<=i_{k+1}, j_k<=j_{k+1}, i_k*j_k<=i_{k+1}*j_{k+1}.

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 14, 18, 29, 39, 57, 74, 109, 138, 192, 247, 335, 421, 565, 703, 926, 1151, 1484, 1828, 2349, 2868, 3624, 4423, 5538, 6706, 8345, 10048, 12394, 14895, 18219, 21789, 26549, 31596, 38226, 45415, 54656, 64654, 77501, 91368, 109003, 128244, 152279
Offset: 0

Views

Author

Alois P. Heinz, May 06 2012

Keywords

Examples

			a(0) = 1: 0 = the empty sum.
a(1) = 1: 1 = 1*1.
a(2) = 2: 2 = 1*1 + 1*1 = 1*2.
a(3) = 3: 3 = 1*1 + 1*1 + 1*1 = 1*1 + 1*2 = 1*3.
a(7) = 18 = A182269(7)-1, one of the 19 sums counted by A182269(7) is not allowed: 7 = 1*3 + 2*2.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, m, i, j) option remember;
          `if`(n=0, 1, `if`(m<1, 0, b(n, m-1, i, j) +`if`(m>n, 0,
            add(b(n-m, m, min(i, k), min(j, m/k)), k=select(x->
             is(x<=min(sqrt(m), i) and m<=j*x), divisors(m))))))
        end:
    a:= n-> b(n$4):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m<1, 0, b[n, m-1, i, j] + If[m>n, 0, Sum[b[n-m, m, Min[i, k], Min[j, m/k]], {k, Select[Divisors[m], # <= Min[Sqrt[m], i] && m <= j*# &]}]]]]; a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 03 2014, after Alois P. Heinz *)

A318948 Number of ways to choose an integer partition of each factor in a factorization of n.

Original entry on oeis.org

1, 2, 3, 9, 7, 17, 15, 40, 39, 56, 56, 126, 101, 165, 197, 336, 297, 496, 490, 774, 837, 1114, 1255, 1948, 2007, 2638, 3127, 4123, 4565, 6201, 6842, 9131, 10311, 12904, 14988, 19516, 21637, 26995, 31488, 39250, 44583, 55418, 63261, 77683, 89935, 108068, 124754
Offset: 1

Views

Author

Gus Wiseman, Sep 05 2018

Keywords

Examples

			The a(4) = 9 ways: (1+1)*(1+1), (1+1+1+1), (1+1)*(2), (2)*(1+1), (2+1+1), (2)*(2), (2+2), (3+1), (4).
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[(Prepend[#1,d]&)/@Select[facs[n/d],Min@@#1>=d&],{d,Rest[Divisors[n]]}]];
    Table[Sum[Times@@PartitionsP/@fac,{fac,facs[n]}],{n,10}]

Formula

Dirichlet g.f.: Product_{n > 1} 1 / (1 - P(n) / n^s) where P = A000041. [clarified by Ilya Gutkovskiy, Oct 26 2019]

A212215 Number of representations of n as a sum of products of pairs of positive integers >=2, n = Sum_{k=1..m} i_k*j_k with 2<=i_k<=j_k, i_k<=i_{k+1}, j_k<=j_{k+1}, i_k*j_k<=i_{k+1}*j_{k+1}.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 2, 1, 2, 0, 5, 1, 4, 2, 9, 1, 11, 2, 16, 5, 18, 3, 33, 8, 31, 11, 52, 11, 64, 16, 83, 29, 100, 26, 152, 39, 159, 59, 233, 61, 280, 83, 354, 129, 423, 122, 591, 180, 644, 241, 864, 260, 1050, 341, 1282, 472, 1523, 490, 2016, 655, 2224
Offset: 0

Views

Author

Alois P. Heinz, May 06 2012

Keywords

Examples

			a(0) = 1: 0 = the empty sum.
a(4) = 1: 4 = 2*2.
a(6) = 1: 6 = 2*3.
a(8) = 2: 8 = 2*2 + 2*2 = 2*4.
a(9) = 1: 9 = 3*3.
a(10) = 2: 10 = 2*2 + 2*3 = 2*5.
a(17) = 1 = A182270(17)-1, one of the 2 sums counted by A182270(17) is not allowed: 17 = 2*4 + 3*3.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, m, i, j) option remember;
          `if`(n=0, 1, `if`(m<4, 0, b(n, m-1, i, j) +`if`(m>n, 0,
            add(b(n-m, m, min(i, k), min(j, m/k)), k=select(x->
             is(x>1 and x<=min(sqrt(m), i) and m<=j*x), divisors(m))))))
        end:
    a:= n-> b(n$4):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m < 4, 0, b[n, m - 1, i, j] + If[m > n, 0, Sum[b[n - m, m, Min[i, k], Min[j, m/k]], {k, Select[ Divisors[m], # > 1 && # <= Min[Sqrt[m], i] && m <= j*# &]}]]]]; a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 23 2017, after Alois P. Heinz *)

A212216 Number of representations of n as a sum of products of distinct pairs of positive integers, n = Sum_{k=1..m} i_k*j_k with i_k<=j_k, i_k<=i_{k+1}, j_k<=j_{k+1}, i_k*j_k

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 7, 8, 12, 15, 18, 25, 28, 34, 44, 51, 59, 75, 87, 103, 124, 143, 163, 198, 228, 261, 310, 354, 404, 479, 538, 612, 708, 802, 907, 1049, 1175, 1320, 1518, 1711, 1910, 2187, 2431, 2724, 3097, 3447, 3843, 4348, 4818, 5373, 6032, 6693, 7420
Offset: 0

Views

Author

Alois P. Heinz, May 06 2012

Keywords

Examples

			a(0) = 1: 0 = the empty sum.
a(1) = 1: 1 = 1*1.
a(2) = 1: 2 = 1*2.
a(3) = 2: 3 = 1*1 + 1*2 = 1*3.
a(4) = 3: 4 = 1*1 + 1*3 = 1*4 = 2*2.
a(5) = 4: 5 = 1*2 + 1*3 = 1*1 + 1*4 = 1*1 + 2*2 = 1*5.
a(6) = 6: 6 = 1*1 + 1*2 + 1*3 = 1*2 + 1*4 = 1*2 + 2*2 = 1*1 + 1+5 = 1*6 = 2*3.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, m, i, j) option remember;
          `if`(n=0, 1, `if`(m<1, 0, b(n, m-1, i, j) +`if`(m>n, 0,
            add(b(n-m, m-1, min(i, k), min(j, m/k)), k=select(x->
             is(x<=min(sqrt(m), i) and m<=j*x), divisors(m))))))
        end:
    a:= n-> b(n$4):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m<1, 0, b[n, m-1, i, j]+If[m>n, 0, Sum [b[n-m, m-1, Min[i, k], Min[j, m/k]], {k, Select[Divisors[m], # <= Min [Sqrt[m], i] && m <= j*# &]}]]]]; a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 04 2014, after Alois P. Heinz *)

A212217 Number of representations of n as a sum of products of distinct pairs of positive integers >=2, n = Sum_{k=1..m} i_k*j_k with 2<=i_k<=j_k, i_k<=i_{k+1}, j_k<=j_{k+1}, i_k*j_k

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 3, 1, 3, 2, 5, 0, 7, 2, 8, 3, 10, 1, 15, 6, 14, 6, 21, 6, 28, 9, 26, 14, 38, 12, 50, 16, 47, 26, 70, 19, 82, 31, 87, 47, 111, 33, 141, 58, 143, 71, 182, 63, 228, 93, 231, 117, 289, 102, 364, 148, 354, 187, 462, 172, 537, 227
Offset: 0

Views

Author

Alois P. Heinz, May 06 2012

Keywords

Examples

			a(0) = 1: 0 = the empty sum.
a(4) = 1: 4 = 2*2.
a(6) = 1: 6 = 2*3.
a(8) = 1: 8 = 2*4.
a(9) = 1: 9 = 3*3.
a(10) = 2: 10 = 2*2 + 2*3 = 2*5.
a(12) = 3: 12 = 2*2 + 2*4 = 2*6 = 3*4.
a(13) = 1: 13 = 2*2 + 3*3.
a(14) = 3: 14 = 2*3 + 2*4 = 2*2 + 2*5 = 2*7.
a(15) = 2: 15 = 2*3 + 3*3 = 3*5.
a(16) = 5: 16 = 2*3 + 2*5 = 2*2 + 2*6 = 2*2 + 3*4 = 2*8 = 4*4.
a(19) = 2: 19 = 2*2 + 2*3 + 3*3 = 2*2 + 3*5.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, m, i, j) option remember;
          `if`(n=0, 1, `if`(m<4, 0, b(n, m-1, i, j) +`if`(m>n, 0,
            add(b(n-m, m-1, min(i, k), min(j, m/k)), k=select(x->
             is(x>1 and x<=min(sqrt(m), i) and m<=j*x), divisors(m))))))
        end:
    a:= n-> b(n$4):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m < 4, 0, b[n, m - 1, i, j] + If[m > n, 0, Sum [b[n - m, m - 1, Min[i, k], Min[j, m/k]], {k, Select[Divisors[m], # > 1 && # <= Min [Sqrt[m], i] && m <= j*# &]}]]]];
    a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 23 2017, after Alois P. Heinz *)

A212218 Number of representations of n as a sum of products of distinct pairs of positive integers, n = Sum_{k=1..m} i_k*j_k with i_k<=j_k, i_k

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 5, 7, 7, 8, 9, 10, 9, 11, 12, 13, 14, 16, 14, 18, 21, 19, 20, 23, 23, 28, 28, 28, 30, 36, 33, 39, 42, 39, 44, 50, 46, 54, 57, 56, 62, 69, 64, 71, 77, 82, 85, 89, 84, 99, 107, 103, 111, 119, 117, 132, 137, 137, 142
Offset: 0

Views

Author

Alois P. Heinz, May 06 2012

Keywords

Examples

			a(0) = 1: 0 = the empty sum.
a(1) = 1: 1 = 1*1.
a(4) = 2: 4 = 1*4 = 2*2.
a(5) = 2: 5 = 1*1 + 2*2 = 1*5.
a(9) = 3: 9 = 1*1 + 2*4 = 1*9 = 3*3.
a(12) = 4: 12 = 1*2 + 2*5 = 1*12 = 2*6 = 3*4.
a(15) = 5: 15 = 1*3 + 2*6 = 1*3 + 3*4 = 1*1 + 2*7 = 1*15 = 3*5.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, m, i, j) option remember;
          `if`(n=0, 1, `if`(m<1, 0, b(n, m-1, i, j) +`if`(m>n, 0,
            add(b(n-m, m-1, min(i, k-1), min(j, m/k-1)), k=select(x->
             is(x<=min(sqrt(m), i) and m<=j*x), divisors(m))))))
        end:
    a:= n-> b(n$4):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m<1, 0, b[n, m-1, i, j]+If[m>n, 0, Sum[b[n-m, m-1, Min[i, k-1], Min[j, m/k-1]], {k, Select[Divisors[m], # <= Min[Sqrt[m], i] && m <= j*#&]}]]]]; a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 05 2014, after Alois P. Heinz *)

A212219 Number of representations of n as a sum of products of distinct pairs of positive integers >=2, n = Sum_{k=1..m} i_k*j_k with 2<=i_k<=j_k, i_k

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 1, 3, 0, 3, 1, 3, 2, 3, 1, 5, 3, 3, 2, 6, 4, 5, 3, 6, 6, 7, 2, 11, 5, 8, 6, 12, 7, 10, 8, 12, 11, 14, 8, 17, 11, 16, 13, 19, 13, 23, 15, 22, 17, 25, 18, 29, 24, 24, 23, 36, 25, 34, 25, 42, 34, 39, 30, 47, 40, 48, 37
Offset: 0

Views

Author

Alois P. Heinz, May 06 2012

Keywords

Examples

			a(0) = 1: 0 = the empty sum.
a(4) = 1: 4 = 2*2.
a(12) = 2: 12 = 2*6 = 3*4.
a(13) = 1: 13 = 2*2 + 3*3.
a(20) = 3: 20 = 2*2 + 4*4 = 2*10 = 4*5.
a(23) = 1: 23 = 2*4 + 3*5.
a(31) = 3: 31 = 2*5 + 3*7 = 2*3 + 5*5 = 2*2 + 3*9.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, m, i, j) option remember;
          `if`(n=0, 1, `if`(m<4, 0, b(n, m-1, i, j) +`if`(m>n, 0,
            add(b(n-m, m-1, min(i, k-1), min(j, m/k-1)), k=select(x->
             is(x>1 and x<=min(sqrt(m), i) and m<=j*x), divisors(m))))))
        end:
    a:= n-> b(n$4):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m<4, 0, b[n, m-1, i, j] + If[m>n, 0, Sum[b[n-m, m-1, Min[i, k-1], Min[j, m/k-1]], {k, Select[Divisors[m], #>1 && # <= Min[Sqrt[m], i] && m <= j*# &]}]]]]; a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 09 2014, after Alois P. Heinz *)

A267597 Number of sum-product knapsack partitions of n. Number of integer partitions y of n such that every sum of products of the parts of a multiset partition of any submultiset of y is distinct.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 3, 4, 4, 6, 7, 8, 12, 12, 14, 18, 23, 23, 32, 30, 35, 50, 48, 47, 56, 80, 77, 87, 105, 100, 134, 139, 145, 194, 170, 192, 250
Offset: 0

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Examples

			The sequence of product-sum knapsack partitions begins:
   0: ()
   1: (1)
   2: (2)
   3: (3)
   4: (4)
   5: (5) (3,2)
   6: (6) (4,2) (3,3)
   7: (7) (5,2) (4,3)
   8: (8) (6,2) (5,3) (4,4)
   9: (9) (7,2) (6,3) (5,4)
  10: (10) (8,2) (7,3) (6,4) (5,5) (4,3,3)
  11: (11) (9,2) (8,3) (7,4) (6,5) (5,4,2) (5,3,3)
The partition (4,4,3) is not a sum-product knapsack partition of 11 because (4*4) = (4)+(4*3).
A complete list of all sums of products of multiset partitions of submultisets of (5,4,2) is:
            0 = 0
          (2) = 2
          (4) = 4
          (5) = 5
        (2*4) = 8
        (2*5) = 10
        (4*5) = 20
      (2*4*5) = 40
      (2)+(4) = 6
      (2)+(5) = 7
    (2)+(4*5) = 22
      (4)+(5) = 9
    (4)+(2*5) = 14
    (5)+(2*4) = 13
  (2)+(4)+(5) = 11
These are all distinct, so (5,4,2) is a sum-product knapsack partition of 11.
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};
    sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    rrtuks[n_]:=Select[IntegerPartitions[n],Function[q,UnsameQ@@Apply[Plus,Apply[Times,Union@@mps/@Union[Subsets[q]],{2}],{1}]]];
    Table[Length[rrtuks[n]],{n,12}]

Extensions

a(13)-a(37) from Sean A. Irvine, Jul 13 2022
Previous Showing 11-20 of 47 results. Next