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 41 results. Next

A292505 Number of complete orderless tree-factorizations of n >= 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 3, 1, 1, 1, 9, 1, 1, 2, 3, 1, 4, 1, 12, 1, 1, 1, 12, 1, 1, 1, 9, 1, 4, 1, 3, 3, 1, 1, 29, 1, 3, 1, 3, 1, 9, 1, 9, 1, 1, 1, 17, 1, 1, 3, 33, 1, 4, 1, 3, 1, 4, 1, 44, 1, 1, 3, 3, 1, 4, 1, 29, 5, 1, 1, 17, 1
Offset: 2

Views

Author

Gus Wiseman, Sep 17 2017

Keywords

Comments

An orderless tree-factorization (see A292504 for definition) is complete if all leaves are prime numbers. This sequence first differs from A281119 at a(64)=33.
a(n) depends only on the prime signature of n. - Andrew Howroyd, Nov 18 2018

Examples

			The a(60)=17 complete orderless tree-factorizations are: (2(2(35))), (2(3(25))), (2(5(23))), (2(235)), (3(2(25))), (3(5(22))), (3(225)), (5(2(23))), (5(3(22))), (5(223)), ((22)(35)), ((23)(25)), (22(35)), (23(25)), (25(23)), (35(22)), (2235).
		

Crossrefs

Programs

  • Mathematica
    postfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[postfacs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    oltfacs[n_]:=If[n<=1,{{}},Prepend[Union@@Function[q,Sort/@Tuples[oltfacs/@q]]/@DeleteCases[postfacs[n],{n}],n]];
    Table[Length[Select[oltfacs[n],FreeQ[#,_Integer?(!PrimeQ[#]&)]&]],{n,2,100}]
  • PARI
    seq(n)={my(v=vector(n), w=vector(n)); v[1]=1; for(k=2, n, w[k]=v[k]+isprime(k); forstep(j=n\k*k, k, -k, my(i=j, e=0); while(i%k==0, i/=k; e++; v[j]+=binomial(e+w[k]-1, e)*v[i]))); w[2..n]} \\ Andrew Howroyd, Nov 18 2018

Formula

a(p^n) = A000669(n) for prime p. - Andrew Howroyd, Nov 18 2018

A318564 Number of multiset partitions of multiset partitions of normal multisets of size n.

Original entry on oeis.org

1, 6, 36, 274, 2408, 24440, 279172, 3542798, 49354816, 747851112, 12231881948, 214593346534, 4016624367288, 79843503990710, 1678916979373760, 37215518578700028, 866953456654946948, 21167221410812128266, 540346299720320080828, 14390314687100383124540, 399023209689817997883900
Offset: 1

Views

Author

Gus Wiseman, Aug 29 2018

Keywords

Comments

A multiset is normal if it spans an initial interval of positive integers.

Examples

			The a(2) = 6 multiset partitions of multiset partitions:
  {{{1,1}}}
  {{{1,2}}}
  {{{1},{1}}}
  {{{1},{2}}}
  {{{1}},{{1}}}
  {{{1}},{{2}}}
		

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]]]];
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Sum[Length[mps[m]],{m,Join@@mps/@allnorm[n]}],{n,6}]
  • PARI
    \\ See links in A339645 for combinatorial species functions.
    seq(n)={my(A=symGroupSeries(n)); NormalLabelingsSeq(sExp(sExp(A))-1)} \\ Andrew Howroyd, Jan 01 2021

Extensions

Terms a(8) and beyond from Andrew Howroyd, Jan 01 2021

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

A322452 Number of factorizations of n into factors > 1 not including any prime powers.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 2, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Dec 09 2018

Keywords

Comments

Also the number of multiset partitions of the multiset of prime indices of n with no constant parts.

Examples

			The a(840) = 11 factorizations are (6*10*14), (6*140), (10*84), (12*70), (14*60), (15*56), (20*42), (21*40), (24*35), (28*30), (840).
		

Crossrefs

Positions of 0's are the prime powers A000961.

Programs

  • Mathematica
    acfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[acfacs[n/d],Min@@#>=d&]],{d,Select[Rest[Divisors[n]],!PrimePowerQ[#]&]}]];
    Table[Length[acfacs[n]],{n,100}]
  • PARI
    A322452(n, m=n) = if(1==n, 1, my(s=0); fordiv(n, d, if((d>1)&&(d<=m)&&(1A322452(n/d, d))); (s)); \\ Antti Karttunen, Jan 03 2019
    
  • PARI
    first(n) = my(res=vector(n)); for(i=1, n, f=factor(i); v=vecsort(f[,2] , , 4); f[, 2] = v; fb = factorback(f); if(fb==i, res[i] = A322452(i), res[i] = res[fb])); res \\ A322452 the function above \\ David A. Corneth, Jan 03 2019

Extensions

More terms from Antti Karttunen, Jan 03 2019

A320632 Numbers k such that there exists a pair of factorizations of k into factors > 1 where no factor of one divides any factor of the other.

Original entry on oeis.org

36, 60, 72, 84, 90, 100, 108, 120, 126, 132, 140, 144, 150, 156, 168, 180, 196, 198, 200, 204, 210, 216, 220, 225, 228, 234, 240, 252, 260, 264, 270, 276, 280, 288, 294, 300, 306, 308, 312, 315, 324, 330, 336, 340, 342, 348, 350, 360, 364, 372, 378, 380, 390
Offset: 1

Views

Author

Gus Wiseman, Dec 09 2018

Keywords

Comments

Positions of nonzero terms in A322437 or A322438.
Mats Granvik has conjectured that these are all the positive integers k such that sigma_0(k) - 2 > (bigomega(k) - 1) * omega(k), where sigma_0 = A000005, omega = A001221, and bigomega = A001222. - Gus Wiseman, Nov 12 2019
Numbers with more semiprime divisors than prime divisors. - Wesley Ivan Hurt, Jun 10 2021

Examples

			An example of such a pair for 36 is (4*9)|(6*6).
		

Crossrefs

The following are additional cross-references relating to Granvik's conjecture.
bigomega(n) * omega(n) is A113901(n).
(bigomega(n) - 1) * omega(n) is A307409(n).
sigma_0(n) - bigomega(n) * omega(n) is A328958(n).
sigma_0(n) - 2 - (omega(n) - 1) * nu(n) is A328959(n).

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],Select[Subsets[facs[#],{2}],And[!Or@@Divisible@@@Tuples[#],!Or@@Divisible@@@Reverse/@Tuples[#]]&]!={}&]
  • PARI
    factorizations(n, m=n, f=List([]), z=List([])) = if(1==n, listput(z,Vec(f)); z, my(newf); fordiv(n, d, if((d>1)&&(d<=m), newf = List(f); listput(newf,d); z = factorizations(n/d, d, newf, z))); (z));
    is_ndf_pair(fac1,fac2) = { for(i=1,#fac1,for(j=1,#fac2,if(!(fac1[i]%fac2[j])||!(fac2[j]%fac1[i]),return(0)))); (1); };
    has_at_least_one_ndfpair(z) = { for(i=1,#z,for(j=i+1,#z,if(is_ndf_pair(z[i],z[j]),return(1)))); (0); };
    isA320632(n) = has_at_least_one_ndfpair(Vec(factorizations(n))); \\ Antti Karttunen, Dec 10 2020

A050345 Number of ways to factor n into distinct factors with one level of parentheses.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 6, 1, 3, 3, 4, 1, 6, 1, 6, 3, 3, 1, 13, 1, 3, 3, 6, 1, 12, 1, 7, 3, 3, 3, 15, 1, 3, 3, 13, 1, 12, 1, 6, 6, 3, 1, 25, 1, 6, 3, 6, 1, 13, 3, 13, 3, 3, 1, 31, 1, 3, 6, 12, 3, 12, 1, 6, 3, 12, 1, 37, 1, 3, 6, 6, 3, 12, 1, 25, 4, 3, 1, 31, 3, 3, 3, 13, 1, 31, 3, 6, 3, 3
Offset: 1

Views

Author

Christian G. Bower, Oct 15 1999

Keywords

Comments

First differs from A296120 at a(36) = 15, A296120(36) = 14. - Gus Wiseman, Apr 27 2025
Each "part" in parentheses is distinct from all others at the same level. Thus (3*2)*(2) is allowed but (3)*(2*2) and (3*2*2) are not.
a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3,1).

Examples

			12 = (12) = (6*2) = (6)*(2) = (4*3) = (4)*(3) = (3*2)*(2).
From _Gus Wiseman_, Apr 26 2025: (Start)
This is the number of ways to partition a factorization of n (counted by A001055) into a set of sets. For example, the a(12) = 6 choices are:
  {{2},{2,3}}
  {{2},{6}}
  {{3},{4}}
  {{2,6}}
  {{3,4}}
  {{12}}
(End)
		

Crossrefs

For multisets of multisets we have A050336.
For integer partitions we have a(p^k) = A050342(k), see A001970, A089259, A261049.
For normal multiset partitions see A116539, A292432, A292444, A381996, A382214, A382216.
The case of a unique choice (positions of 1) is A166684.
Twice-partitions of this type are counted by A358914, see A270995, A281113, A294788.
For sets of multisets we have A383310 (distinct products A296118).
For multisets of sets we have we have A383311, see A296119.
A001055 counts factorizations, strict A045778.
A050320 counts factorizations into squarefree numbers, distinct A050326.
A302494 gives MM-numbers of sets of sets.
A382077 counts partitions that can be partitioned into a sets of sets, ranks A382200.
A382078 counts partitions that cannot be partitioned into a sets of sets, ranks A293243.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}}, Join@@Table[Map[Prepend[#,d]&, Select[facs[n/d],Min@@#>=d&]],{d, Rest[Divisors[n]]}]];
    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]]]];
    Table[Sum[Length[Select[mps[y], UnsameQ@@#&&And@@UnsameQ@@@#&]], {y,facs[n]}],{n,30}] (* Gus Wiseman, Apr 26 2025 *)

Formula

Dirichlet g.f.: Product_{n>=2}(1+1/n^s)^A045778(n).
a(n) = A050346(A025487^(-1)(A046523(n))), where A025487^(-1) is the inverse with A025487^(-1)(A025487(n))=n. - R. J. Mathar, May 25 2017
a(n) = A050346(A101296(n)). - Antti Karttunen, May 25 2017

A050338 Number of ways of factoring n with 2 levels of parentheses.

Original entry on oeis.org

1, 1, 1, 4, 1, 4, 1, 10, 4, 4, 1, 16, 1, 4, 4, 30, 1, 16, 1, 16, 4, 4, 1, 54, 4, 4, 10, 16, 1, 22, 1, 75, 4, 4, 4, 74, 1, 4, 4, 54, 1, 22, 1, 16, 16, 4, 1, 176, 4, 16, 4, 16, 1, 54, 4, 54, 4, 4, 1, 102, 1, 4, 16, 206, 4, 22, 1, 16, 4, 22, 1, 267, 1, 4, 16, 16, 4, 22, 1, 176, 30, 4, 1, 102
Offset: 1

Views

Author

Christian G. Bower, Oct 15 1999

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3,1).

Examples

			4 = ((4)) = ((2*2)) = ((2)*(2)) = ((2))*((2)).
		

Crossrefs

Formula

Dirichlet g.f.: Product_{n>=2}(1/(1-1/n^s)^A050336(n)).
a(n) = A050339(A101296(n)). - R. J. Mathar, May 26 2017

A322435 Number of pairs of factorizations of n into factors > 1 where no factor of the second divides any factor of the first.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 5, 0, 3, 0, 3, 1, 1, 0, 7, 1, 1, 2, 3, 0, 4, 0, 7, 1, 1, 1, 15, 0, 1, 1, 7, 0, 4, 0, 3, 3, 1, 0, 16, 1, 3, 1, 3, 0, 7, 1, 7, 1, 1, 0, 18, 0, 1, 3, 16, 1, 4, 0, 3, 1, 4, 0, 32, 0, 1, 3, 3, 1, 4, 0, 16, 5, 1, 0, 18, 1
Offset: 1

Views

Author

Gus Wiseman, Dec 08 2018

Keywords

Examples

			The a(36) = 15 pairs of factorizations:
  (2*2*3*3)|(4*9)
  (2*2*3*3)|(6*6)
  (2*2*3*3)|(36)
    (2*2*9)|(6*6)
    (2*2*9)|(36)
    (2*3*6)|(4*9)
    (2*3*6)|(36)
     (2*18)|(36)
    (3*3*4)|(6*6)
    (3*3*4)|(36)
     (3*12)|(36)
      (4*9)|(6*6)
      (4*9)|(36)
      (6*6)|(4*9)
      (6*6)|(36)
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[Tuples[facs[n],2],!Or@@Divisible@@@Tuples[#]&]],{n,100}]

A330665 Number of balanced reduced multisystems of maximal depth whose atoms are the prime indices of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 3, 1, 5, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 1, 2, 2, 1, 1, 16, 1, 2, 1, 2, 1, 5, 1, 5, 1, 1, 1, 11, 1, 1, 2, 16, 1, 3, 1, 2, 1, 3, 1, 27, 1, 1, 2, 2, 1, 3, 1, 16, 2, 1, 1, 11, 1
Offset: 1

Views

Author

Gus Wiseman, Dec 27 2019

Keywords

Comments

First differs from A317145 at a(32) = 5, A317145(32) = 4.
A balanced reduced multisystem is either a finite multiset, or a multiset partition with at least two parts, not all of which are singletons, of a balanced reduced multisystem.
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.
Also series/singleton-reduced factorizations of n with Omega(n) levels of parentheses. See A001055, A050336, A050338, A050340, etc.

Examples

			The a(n) multisystems for n = 2, 6, 12, 24, 48:
  {1}  {1,2}  {{1},{1,2}}  {{{1}},{{1},{1,2}}}  {{{{1}}},{{{1}},{{1},{1,2}}}}
              {{2},{1,1}}  {{{1,1}},{{1},{2}}}  {{{{1}}},{{{1,1}},{{1},{2}}}}
                           {{{1}},{{2},{1,1}}}  {{{{1},{1}}},{{{1}},{{1,2}}}}
                           {{{1,2}},{{1},{1}}}  {{{{1},{1,1}}},{{{1}},{{2}}}}
                           {{{2}},{{1},{1,1}}}  {{{{1,1}}},{{{1}},{{1},{2}}}}
                                                {{{{1}}},{{{1}},{{2},{1,1}}}}
                                                {{{{1}}},{{{1,2}},{{1},{1}}}}
                                                {{{{1},{1}}},{{{2}},{{1,1}}}}
                                                {{{{1},{1,2}}},{{{1}},{{1}}}}
                                                {{{{1,1}}},{{{2}},{{1},{1}}}}
                                                {{{{1}}},{{{2}},{{1},{1,1}}}}
                                                {{{{1},{2}}},{{{1}},{{1,1}}}}
                                                {{{{1,2}}},{{{1}},{{1},{1}}}}
                                                {{{{2}}},{{{1}},{{1},{1,1}}}}
                                                {{{{2}}},{{{1,1}},{{1},{1}}}}
                                                {{{{2},{1,1}}},{{{1}},{{1}}}}
		

Crossrefs

The last nonzero term in row n of A330667 is a(n).
The chain version is A317145.
The non-maximal version is A318812.
Unlabeled versions are A330664 and A330663.
Other labeled versions are A330675 (strongly normal) and A330676 (normal).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    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]]]];
    totm[m_]:=Prepend[Join@@Table[totm[p],{p,Select[mps[m],1
    				

Formula

a(2^n) = A000111(n - 1).
a(product of n distinct primes) = A006472(n).

A066637 Total number of elements in all factorizations of n with all factors > 1.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 6, 3, 3, 1, 8, 1, 3, 3, 12, 1, 8, 1, 8, 3, 3, 1, 17, 3, 3, 6, 8, 1, 10, 1, 20, 3, 3, 3, 22, 1, 3, 3, 17, 1, 10, 1, 8, 8, 3, 1, 34, 3, 8, 3, 8, 1, 17, 3, 17, 3, 3, 1, 27, 1, 3, 8, 35, 3, 10, 1, 8, 3, 10, 1, 46, 1, 3, 8, 8, 3, 10, 1, 34, 12, 3, 1, 27, 3, 3, 3, 17, 1, 27, 3, 8, 3, 3, 3
Offset: 1

Views

Author

Amarnath Murthy, Dec 28 2001

Keywords

Comments

From Gus Wiseman, Apr 18 2021: (Start)
Number of ways to choose a factor index or position in a factorization of n. The version selecting a factor value is A339564. For example, the factorizations of n = 2, 4, 8, 12, 16, 24, 30 with a selected position (in parentheses) are:
((2)) ((4)) ((8)) ((12)) ((16)) ((24)) ((30))
((2)*2) ((2)*4) ((2)*6) ((2)*8) ((3)*8) ((5)*6)
(2*(2)) (2*(4)) (2*(6)) (2*(8)) (3*(8)) (5*(6))
((2)*2*2) ((3)*4) ((4)*4) ((4)*6) ((2)*15)
(2*(2)*2) (3*(4)) (4*(4)) (4*(6)) (2*(15))
(2*2*(2)) ((2)*2*3) ((2)*2*4) ((2)*12) ((3)*10)
(2*(2)*3) (2*(2)*4) (2*(12)) (3*(10))
(2*2*(3)) (2*2*(4)) ((2)*2*6) ((2)*3*5)
((2)*2*2*2) (2*(2)*6) (2*(3)*5)
(2*(2)*2*2) (2*2*(6)) (2*3*(5))
(2*2*(2)*2) ((2)*3*4)
(2*2*2*(2)) (2*(3)*4)
(2*3*(4))
((2)*2*2*3)
(2*(2)*2*3)
(2*2*(2)*3)
(2*2*2*(3))
(End)

Examples

			a(12) = 8: there are 4 factorizations of 12: (12), (6*2), (4*3), (3*2*2) having 1, 2, 2, 3 elements respectively, a total of 8.
		

References

  • Amarnath Murthy, Generalization of Partition function, Introducing Smarandache Factor partitions, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring 2000.
  • Amarnath Murthy, Length and extent of Smarandache Factor partitions, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring 2000.

Crossrefs

The version for normal multisets is A001787.
The version for compositions is A001792.
The version for partitions is A006128 (strict: A015723).
Choosing a value instead of position gives A339564.
A000070 counts partitions with a selected part.
A001055 counts factorizations.
A002033 and A074206 count ordered factorizations.
A067824 counts strict chains of divisors starting with n.
A336875 counts compositions with a selected part.

Programs

  • Maple
    # Return a list of lists which are factorizations (product representations)
    # of n. Within each sublist, the factors are sorted. A minimum factor in
    # each element of sublists returned can be specified with 'mincomp'.
    # If mincomp=2, the number of sublists contained in the list returned is A001055(n).
    # Example:
    # n=8 and mincomp=2 return [[2,2,2],[4,8],[8]]
    listProdRep := proc(n,mincomp)
        local dvs,resul,f,i,j,rli,tmp ;
        resul := [] ;
        # list returned is empty if n < mincomp
        if n >= mincomp then
            if n = 1 then
                RETURN([1]) ;
            else
                # compute the divisors, and take each divisor
                # as a head element (minimum element) of one of the
                # sublists. Example: for n=8 use {1,2,4,8}, and consider
                # (for mincomp=2) sublists [2,...], [4,...] and [8].
                dvs := numtheory[divisors](n) ;
                for i from 1 to nops(dvs) do
                    # select the head element 'f' from the divisors
                    f := op(i,dvs) ;
                    # if this is already the maximum divisor n
                    # itself, this head element is the last in
                    # the sublist
                    if f =n and f >= mincomp then
                        resul := [op(resul),[f]] ;
                    elif f >= mincomp then
                        # if this is not the maximum element
                        # n itself, produce all factorizations
                        # of the remaining factor recursively.
                        rli := procname(n/f,f) ;
                        # Prepend all the results produced
                        # from the recursion with the head
                        # element for the result.
                        for j from 1 to nops(rli) do
                            tmp := [f,op(op(j,rli))] ;
                            resul := [op(resul),tmp] ;
                        od ;
                    fi ;
                od ;
            fi ;
        fi ;
        resul ;
    end:
    A066637 := proc(n)
        local f,d;
        a := 0 ;
        for d in listProdRep(n,2) do
            a := a+nops(d) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 11 2013
    # second Maple program:
    with(numtheory):
    b:= proc(n, k) option remember; `if`(n>k, 0, [1$2])+
          `if`(isprime(n), 0, (p-> p+[0, p[1]])(add(
          `if`(d>k, 0, b(n/d, d)), d=divisors(n) minus {1, n})))
        end:
    a:= n-> `if`(n<2, 0, b(n$2)[2]):
    seq(a(n), n=1..120); # Alois P. Heinz, Feb 12 2019
  • Mathematica
    g[1, r_] := g[1, r]={1, 0}; g[n_, r_] := g[n, r]=Module[{ds, i, val}, ds=Select[Divisors[n], 1<#<=r&]; val={0, 0}+Sum[g[n/ds[[i]], ds[[i]]], {i, 1, Length[ds]}]; val+{0, val[[1]]}]; a[n_] := g[n, n][[2]]; a/@Range[95] (* g[n, r] = {c, f}, where c is the number of factorizations of n with factors <= r and f is the total number of factors in them. - Dean Hickerson, Oct 28 2002 *)
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];Table[Sum[Length[fac],{fac,facs[n]}],{n,50}] (* Gus Wiseman, Apr 18 2021 *)
Previous Showing 11-20 of 41 results. Next