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

A370808 Greatest number of multisets that can be obtained by choosing a divisor of each part of an integer partition of n.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 10, 11, 14, 17, 19, 23, 29, 30, 39, 41, 51, 58, 66, 78, 82, 102, 110, 132, 144, 162, 186, 210, 228, 260, 296, 328, 366, 412, 462, 512, 560, 638, 692, 764, 860, 924, 1028, 1122, 1276, 1406, 1528, 1721, 1898, 2056, 2318, 2506, 2812, 3020, 3442
Offset: 0

Views

Author

Gus Wiseman, Mar 05 2024

Keywords

Examples

			For the partitions of 5 we have the following choices:
      (5): {{1},{5}}
     (41): {{1,1},{1,2},{1,4}}
     (32): {{1,1},{1,2},{1,3},{2,3}}
    (311): {{1,1,1},{1,1,3}}
    (221): {{1,1,1},{1,1,2},{1,2,2}}
   (2111): {{1,1,1,1},{1,1,1,2}}
  (11111): {{1,1,1,1,1}}
So a(5) = 4.
		

Crossrefs

For just prime factors we have A370809.
The version for factorizations is A370816, for just prime factors A370817.
A000005 counts divisors.
A000041 counts integer partitions, strict A000009.
A006530 gives greatest prime factor, least A020639.
A027746 lists prime factors, A112798 indices, length A001222.
A239312 counts condensed partitions, ranks A368110.
A355731 counts choices of a divisor of each prime index, firsts A355732.
A355733 counts choices of divisors of prime indicec.
A370320 counts non-condensed partitions, ranks A355740.
A370592 counts factor-choosable partitions, complement A370593.

Programs

  • Mathematica
    Table[Max[Length[Union[Sort/@Tuples[Divisors/@#]]]&/@IntegerPartitions[n]],{n,0,30}]

Extensions

Terms a(31) onward from Max Alekseyev, Sep 17 2024

A318949 Number of ways to write n as an orderless product of orderless sums.

Original entry on oeis.org

1, 2, 3, 8, 7, 17, 15, 36, 36, 56, 56, 123, 101, 165, 197, 310, 297, 490, 490, 767, 837, 1114, 1255, 1925, 1986, 2638, 3110, 4108, 4565, 6201, 6842, 9043, 10311, 12904, 14988, 19398, 21637, 26995, 31488, 39180, 44583, 55418, 63261, 77627, 89914, 108068, 124754
Offset: 1

Views

Author

Gus Wiseman, Sep 05 2018

Keywords

Examples

			The a(6) = 17 ways:
  (6)              (2)*(3)
  (3+3)            (2)*(2+1)
  (4+2)            (2)*(1+1+1)
  (5+1)            (1+1)*(3)
  (2+2+2)          (1+1)*(2+1)
  (3+2+1)          (1+1)*(1+1+1)
  (4+1+1)
  (2+2+1+1)
  (3+1+1+1)
  (2+1+1+1+1)
  (1+1+1+1+1+1)
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[(Prepend[#1,d]&)/@Select[facs[n/d],Min@@#1>=d&],{d,Rest[Divisors[n]]}]];
    prodsums[n_]:=Union[Sort/@Join@@Table[Tuples[IntegerPartitions/@fac],{fac,facs[n]}]];
    Table[Length[prodsums[n]],{n,30}]
  • PARI
    MultEulerT(u)={my(v=vector(#u)); v[1]=1; for(k=2, #u, forstep(j=#v\k*k, k, -k, my(i=j, e=0); while(i%k==0, i/=k; e++; v[j]+=binomial(e+u[k]-1, e)*v[i]))); v}
    seq(n)={MultEulerT(vector(n, n, numbpart(n)))} \\ Andrew Howroyd, Oct 26 2019

Formula

Dirichlet g.f.: Product_{k>=2} 1 / (1 - k^(-s))^p(k), where p(k) = number of partitions of k (A000041). - Ilya Gutkovskiy, Oct 26 2019

A048249 Number of distinct values produced from sums and products of n unity arguments.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 11, 17, 23, 30, 44, 60, 80, 114, 156, 212, 296, 404, 556, 770, 1065, 1463, 2032, 2795, 3889, 5364, 7422, 10300, 14229, 19722, 27391, 37892, 52599, 73075, 101301, 140588, 195405, 271024, 376608, 523518, 726812, 1010576, 1405013, 1952498
Offset: 1

Views

Author

Keywords

Comments

Values listed calculated by exhaustive search algorithm.
For n+1 operands (n operations) there are (2n)!/((n!)((n+1)!)) possible postfix forms over a single operator. For each such form, there are 2^n ways to assign 2 operators (here, sum and product). Calculate results and eliminate duplicates.
Number of distinct positive integers that can be obtained by iteratively adding or multiplying together parts of an integer partition until only one part remains, starting with 1^n. - Gus Wiseman, Sep 29 2018

Examples

			a(3)=3 since (in postfix): 111** = 11*1* = 1, 111*+ = 11*1+ = 111+* = 11+1* = 2 and 111++ = 11+1+ = 3. Note that at n=7, the 11 possible values produced are the set {1,2,3,4,5,6,7,8,9,10,12}. This is the first n for which there are "skipped" values in the set.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, {1}, {seq(seq(seq(
         [f+g, f*g][], g=b(n-i)), f=b(i)), i=1..iquo(n, 2))})
        end:
    a:= n-> nops(b(n)):
    seq(a(n), n=1..35);  # Alois P. Heinz, May 05 2019
  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    Table[Length[Select[ReplaceListRepeated[{Array[1&,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,10}] (* Gus Wiseman, Sep 29 2018 *)
  • Python
    from functools import cache
    @cache
    def f(m):
        if m == 1: return {1}
        out = set()
        for j in range(1, m//2+1):
            for x in f(j):
                for y in f(m-j):
                    out.update([x + y, x * y])
        return out
    def a(n): return len(f(n))
    print([a(n) for n in range(1, 40)]) # Michael S. Branicky, Aug 03 2022

Formula

Equals partial sum of "number of numbers of complexity n" (A005421). - Jonathan Vos Post, Apr 07 2006

Extensions

More terms from David W. Wilson, Oct 10 2001
a(43)-a(44) from Alois P. Heinz, May 05 2019

A182269 Number of representations of n as a sum of products of pairs of positive integers, considered to be equivalent when terms or factors are reordered.

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 14, 19, 31, 43, 65, 88, 132, 177, 253, 340, 478, 633, 874, 1150, 1562, 2045, 2736, 3553, 4713, 6082, 7969, 10234, 13301, 16973, 21889, 27789, 35577, 44961, 57179, 71906, 90950, 113874, 143204, 178592, 223505, 277599, 345822, 427934, 530797
Offset: 0

Views

Author

Alois P. Heinz, Apr 22 2012

Keywords

Comments

From Yifan Xie, Sep 25 2024: (Start)
a(n) is the number of distinct sets A = {b_1, b_2, ..., b_n} such that 2*n positive integers x_1, x_2, ..., x_(2*n) exist where A = {x_1+x_2, x_3+x_4, ..., x_(2*n-1)+x_(2*n)} = {x_1*x_2, x_3*x_4, ..., x_(2*n-1)*x_(2*n)}.
Proof: Suppose that the number of sets A is b(n). Denote (x_(2*i-1)-1)*(x_(2*i)-1) by c_i. (1 <= i <= n)
Taking the sums of B and C, c_1 + c_2 + ... + c_n = n. (1)
Consider b_1, ..., b_n as n vertices, then the map B -> C is a directed graph G on these vertices, where each vertex has a source and a sink, so it can either be a cycle itself or decomposed into two or more cycles.
For the first case, the condition is equivalent to every proper subset of A' = {b_1, ..., b_n} is invalid for the corresponding n. Using (1), every partial sum of c_i is not equal to the number of addends. Therefore, c_i != 1. Then there must exist c_j = 0, hence c_i != 2. Then there must exist another c_k = 0, hence c_i != 3, and so on. Thus c_1, c_2, ..., c_n must be a permutation of 0, 0, ..., 0, n. Suppose that c_n = n, x_1 = x_3 = ... = x_(2*n-3) = 1. Since n has floor((A000005(n)+1)/2) ways to be expressed as the product of two positive integers, each product n = y*z means that x_(2*i-1) = y+1, x_(2*i) = z+1, thus there exists (y+1)*(z+1) in A, 1 + x_(2*l) = (a+1)*(b+1), 1*x_(2*l) = (a+1)*(b+1)-1, there exists (a+1)*(b+1)-1 in A, and so on until a+b+2 = (a+1)*(b+1)-1. In conclusion, there are floor((A000005(n)+1)/2) distinct A's in the second case, each of which is a group of consecutive integers. Denote the array by n = a*b .
For the second case, the array A can be decomposed into smaller arrays representing smaller n's, without breaking the structures of B and C. This process will finally end with all smaller arrays in the first case. Using the same notation, the arrays can be expressed as n = y_1*z_1 + y_2*z_2 + ... + y_s*z*s.
Therefore b(n) is the number of representations of n as a sum of products of pairs of unordered positive integers, hence b(n) = a(n). (End)

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(4) = 6: 4 = 1*1 + 1*1 + 1*1 + 1*1 = 1*1 + 1*1 + 1*2 = 1*1 + 1*3 = 1*2 + 1*2 = 2*2 = 1*4.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember;  `if`(n=0, 1, add(add(
           d*ceil(tau(d)/2), d=divisors(j)) *a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..60);
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*Ceiling[DivisorSigma[0, d]/2], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Sep 09 2014, after Alois P. Heinz *)
    nmax = 50; CoefficientList[Series[Product[Product[1/(1 - x^(k*j)), {j, 1, Min[k, nmax/k]}], {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 19 2019 *)

Formula

Euler transform of A038548.
G.f.: Product_{k>0} 1/(1-x^k)^A038548(k).
G.f.: Product_{k>=1} (Product_{j=1..k} 1/(1 - x^(k*j))). - Vaclav Kotesovec, Aug 19 2019

A211856 Number of representations of n as a sum of products of distinct pairs of positive integers, considered to be equivalent when terms or factors are reordered.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 8, 10, 15, 20, 25, 34, 44, 56, 74, 94, 117, 151, 190, 236, 298, 370, 455, 567, 699, 853, 1050, 1282, 1555, 1898, 2299, 2770, 3351, 4035, 4837, 5811, 6952, 8288, 9898, 11782, 13978, 16600, 19660, 23225, 27451, 32366, 38074, 44799, 52609
Offset: 0

Views

Author

Alois P. Heinz, Apr 22 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 = 2*2 = 1*1 + 1*3 = 1*4.
a(5) = 4: 5 = 1*1 + 2*2 = 1*2 + 1*3 = 1*1 + 1*4 = 1*5.
a(6) = 6: 6 = 1*1 + 1*5 = 1*1 + 1*2 + 1*3 = 1*2 + 1*4 = 1*2 + 2*2 = 1*6 = 2*3
a(7) = 8: 7 = 1*1 + 1*2 + 1*4 = 1*1 + 1*2 + 2*2 = 1*1 + 1*6 = 1*1 + 2*3 = 1*2 + 1*5 = 1*3 + 1*4 = 1*3 + 2*2 = 1*7.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; local c;
          c:= ceil(tau(i)/2);
          `if`(n=0, 1, `if`(i<1, 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..60);
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{c}, c = Ceiling[DivisorSigma[0, i]/2]; If[n == 0, 1, If[i < 1, 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, 60}] (* Jean-François Alcover, Sep 09 2014, after Alois P. Heinz *)
    nmax = 50; CoefficientList[Series[Product[Product[(1 + x^(k*j)), {j, 1, Min[k, nmax/k]}], {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 19 2019 *)

Formula

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

A325034 Sum of products of the multisets of prime indices of each prime index of n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 1, 3, 2, 3, 3, 3, 2, 2, 3, 4, 4, 3, 1, 4, 2, 4, 4, 4, 4, 3, 3, 3, 3, 4, 5, 5, 4, 5, 3, 4, 2, 2, 3, 5, 6, 3, 4, 5, 4, 5, 6, 5, 2, 5, 5, 4, 1, 4, 5, 4, 2, 4, 7, 5, 4, 6, 3, 6, 4, 5, 8, 6, 5, 4, 3, 5, 8, 3, 5, 3, 4, 4, 5, 6, 4, 7, 9, 4, 6, 5, 4
Offset: 1

Views

Author

Gus Wiseman, Mar 25 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			94 has prime indices {1,15} with prime indices {{},{2,3}} with products {1,6} with sum a(94) = 7.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Plus@@Times@@@primeMS/@primeMS[n],{n,100}]

Formula

Totally additive with a(prime(n)) = A003963(n).

A319910 Number of distinct pairs (m, y), where m >= 1 and y is an integer partition of n, such that m can be obtained by iteratively adding or multiplying together parts of y until only one part (equal to m) remains.

Original entry on oeis.org

1, 3, 6, 11, 23, 48, 85, 178, 331, 619, 1176, 2183, 3876, 7013, 12447, 21719, 37628, 64570, 109723, 185055
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2018

Keywords

Examples

			The a(4) = 11 pairs:
  4 <= (4)
  3 <= (3,1)
  4 <= (3,1)
  4 <= (2,2)
  2 <= (2,1,1)
  3 <= (2,1,1)
  4 <= (2,1,1)
  1 <= (1,1,1,1)
  2 <= (1,1,1,1)
  3 <= (1,1,1,1)
  4 <= (1,1,1,1)
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    nexos[ptn_]:=If[Length[ptn]==0,{0},Union@@Select[ReplaceListRepeated[{Sort[ptn]},{{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&]];
    Table[Total[Length/@nexos/@IntegerPartitions[n]],{n,20}]

A319913 Number of distinct integer partitions whose parts can be combined together using additions and multiplications to obtain n, with the exception that 1's can only be added and not multiplied with other parts.

Original entry on oeis.org

1, 2, 3, 5, 7, 16, 20, 37, 53, 81, 107, 177, 227, 332, 449, 647, 830, 1162, 1480, 2032, 2597, 3447, 4348, 5775, 7251, 9374, 11758, 15026, 18640, 23688, 29220, 36771, 45128, 56168, 68674, 85015, 103394, 126923, 153871, 187911, 226653
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2018

Keywords

Comments

All parts of the integer partition must be used in such a combination.

Examples

			The a(7) = 20 partitions (which are not all partitions of 7):
  (7),
  (61), (52), (43),
  (511), (321), (421), (331), (322),
  (3111), (4111), (2211), (3211), (2221),
  (21111), (31111), (22111),
  (111111), (211111),
  (1111111).
This list contains (2211) because we can write 7 = (2+1)*2+1. It contains (321) because we can write 7 = 3*2+1, even though the sum of parts is only 6.
		

Crossrefs

Formula

a(n) >= A000041(n).
a(n) >= A001055(n).

Extensions

a(13)-a(41) from Charlie Neder, Jun 02 2019

A066815 Number of partitions of n into sums of products.

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 14, 19, 33, 45, 69, 94, 148, 197, 289, 390, 575, 762, 1086, 1439, 2040, 2687, 3712, 4874, 6749, 8792, 11918, 15526, 20998, 27164, 36277, 46820, 62367, 80146, 105569, 135326, 177979, 227139, 296027, 377142, 490554, 622526, 804158
Offset: 0

Views

Author

Vladeta Jovovic, Jan 20 2002

Keywords

Comments

Number of ways to choose a factorization of each part of an integer partition of n. - Gus Wiseman, Sep 05 2018
This sequence is obtained from the generalized Euler transform in A266964 by taking f(n) = 1, g(n) = A001055(n). - Seiichi Manyama, Nov 14 2018

Examples

			From _Gus Wiseman_, Sep 05 2018: (Start)
The a(6) = 14 partitions of 6 into sums of products:
  6, 2*3,
  5+1, 4+2, 2*2+2, 3+3,
  4+1+1, 2*2+1+1, 3+2+1, 2+2+2,
  3+1+1+1, 2+2+1+1,
  2+1+1+1+1,
  1+1+1+1+1+1.
(End)
		

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[Length[Join@@Table[Tuples[facs/@ptn],{ptn,IntegerPartitions[n]}]],{n,20}] (* Gus Wiseman, Sep 05 2018 *)

Formula

G.f.: Product_{k>=1} 1/(1-A001055(k)*x^k).
a(n) = 1/n*Sum_{k=1..n} a(n-k)*b(k), n > 0, a(0)=1, b(k)=Sum_{d|k} d*(A001055(d))^(k/d).

Extensions

Renamed by T. D. Noe, May 24 2011

A182270 Number of representations of n as a sum of products of 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, 2, 1, 2, 0, 5, 1, 4, 2, 9, 2, 11, 3, 16, 7, 19, 6, 34, 13, 35, 18, 57, 23, 73, 32, 99, 53, 125, 60, 186, 92, 215, 127, 311, 164, 394, 221, 518, 320, 656, 386, 903, 545, 1091, 719, 1470, 925, 1863, 1215, 2390, 1642, 3015, 2037, 3966
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) = 2: 8 = 2*2 + 2*2 = 2*4.
a(9) = 1: 9 = 3*3.
a(12) = 5: 12 = 2*2 + 2*2 + 2*2 = 2*2 + 2*4 = 2*3 + 2*3 = 2*6 = 3*4.
a(13) = 1: 13 = 2*2 + 3*3.
a(14) = 4: 14 = 2*2 + 2*2 + 2*3 = 2*3 + 2*4 = 2*2 + 2*5 = 2*7.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n=0, 1, add(add(
           d*(ceil(tau(d)/2)-1), d=divisors(j)) *a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..70);
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*(Ceiling[DivisorSigma[0, d]/2] - 1), {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Sep 09 2014, after Alois P. Heinz *)

Formula

Euler transform of A038548-1.
G.f.: Product_{k>0} 1/(1-x^k)^(A038548(k)-1).
G.f.: Product_{i>=1} Product_{j=2..i} 1/(1 - x^(i*j)). - Ilya Gutkovskiy, Sep 23 2019
Showing 1-10 of 47 results. Next