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

A066739 Number of representations of n as a sum of products of positive integers. 1 is not allowed as a factor, unless it is the only factor. Representations which differ only in the order of terms or factors are considered equivalent.

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 14, 19, 32, 44, 67, 91, 139, 186, 269, 362, 518, 687, 960, 1267, 1747, 2294, 3106, 4052, 5449, 7063, 9365, 12092, 15914, 20422, 26639, 34029, 44091, 56076, 72110, 91306, 116808, 147272, 187224, 235201, 297594, 372390, 468844, 584644, 732942
Offset: 0

Views

Author

Naohiro Nomoto, Jan 16 2002

Keywords

Examples

			For n=5, 5 = 4+1 = 2*2+1 = 3+2 = 3+1+1 = 2+2+1 = 2+1+1+1 = 1+1+1+1+1, so a(5) = 8.
For n=8, 8 = 4*2 = 2*2*2 = ... = 4+4 = 2*2+4 = 2*2+2*2 = ...; note that there are 3 ways to factor the terms of 4+4. In general, if a partition contains a number k exactly r times, then the number of ways to factor the k's is the binomial coefficient C(A001055(k)+r-1,r).
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, k) option remember;
          `if`(n>k, 0, 1) +`if`(isprime(n), 0,
          add(`if`(d>k, 0, b(n/d, d)), d=divisors(n) minus {1, n}))
        end:
    a:= proc(n) option remember;
          `if`(n=0, 1, add(add(d*b(d, d), d=divisors(j)) *a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..60); # Alois P. Heinz, Apr 22 2012
  • Mathematica
    p[ n_, 1 ] := If[ n==1, 1, 0 ]; p[ 1, k_ ] := 1; p[ n_, k_ ] := p[ n, k ]=p[ n, k-1 ]+If[ Mod[ n, k ]==0, p[ n/k, k ], 0 ]; A001055[ n_ ] := p[ n, n ]; a[ n_, 1 ] := 1; a[ 0, k_ ] := 1; a[ n_, k_ ] := If[ k>n, a[ n, n ], a[ n, k ]=a[ n, k-1 ]+Sum[ Binomial[ A001055[ k ]+r-1, r ]a[ n-k*r, k-1 ], {r, 1, Floor[ n/k ]} ] ]; a[ n_ ] := a[ n, n ]; (* p[ n, k ]=number of factorizations of n with factors <= k. a[ n, k ]=number of representations of n as a sum of products of positive integers, with summands <= k *)
    b[n_, k_] := b[n, k] = If[n>k, 0, 1] + If[PrimeQ[n], 0, Sum[If[d>k, 0, b[n/d, d]], {d, Divisors[n] ~Complement~ {1, n}}]]; a[0] = 1; a[n_] := a[n] = If[n == 0, 1, Sum[DivisorSum[j, #*b[#, #]&]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 10 2015, after Alois P. Heinz *)
    facs[n_]:=If[n<=1,{{}},Join@@Table[(Prepend[#1,d]&)/@Select[facs[n/d],Min@@#1>=d&],{d,Rest[Divisors[n]]}]];
    Table[Length[Union[Sort/@Join@@Table[Tuples[facs/@ptn],{ptn,IntegerPartitions[n]}]]],{n,50}] (* Gus Wiseman, Sep 05 2018 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import divisors, isprime
    @cacheit
    def b(n, k): return (0 if n>k else 1) + (0 if isprime(n) else sum([0 if d>k else b(n//d, d) for d in divisors(n)[1:-1]]))
    @cacheit
    def a(n): return 1 if n==0 else sum(sum(d*b(d, d) for d in divisors(j))*a(n - j)  for j in range(1, n + 1))//n
    print([a(n) for n in range(61)]) # Indranil Ghosh, Aug 19 2017, after Maple code

Formula

a(n) = Sum_{pi} Product_{m=1..n} binomial(k(m)+A001055(m)-1, k(m)), where pi runs through all partitions k(1) + 2 * k( 2) + ... + n * k(n) = n. a(n)=1/n*Sum_{m=1..n} a(n-m)*b(m), n > 0, a(0)=1, b(m)=Sum_{d|m} d*A001055(d). Euler transform of A001055(n): Product_{m=1..infinity} (1-x^m)^(-A001055(m)). - Vladeta Jovovic, Jan 21 2002

Extensions

Edited by Dean Hickerson, Jan 19 2002

A301700 Number of aperiodic rooted trees with n nodes.

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 21, 52, 120, 290, 697, 1713, 4200, 10446, 26053, 65473, 165257, 419357, 1068239, 2732509, 7013242, 18059960, 46641983, 120790324, 313593621, 816046050, 2128101601, 5560829666, 14557746453, 38177226541, 100281484375, 263815322761, 695027102020
Offset: 1

Views

Author

Gus Wiseman, Apr 23 2018

Keywords

Comments

An unlabeled rooted tree is aperiodic if the multiset of branches of the root is an aperiodic multiset, meaning it has relatively prime multiplicities, and each branch is also aperiodic.

Examples

			The a(6) = 10 aperiodic trees are (((((o))))), (((o(o)))), ((o((o)))), ((oo(o))), (o(((o)))), (o(o(o))), ((o)((o))), (oo((o))), (o(o)(o)), (ooo(o)).
		

Crossrefs

Programs

  • Mathematica
    arut[n_]:=arut[n]=If[n===1,{{}},Join@@Function[c,Select[Union[Sort/@Tuples[arut/@c]],GCD@@Length/@Split[#]===1&]]/@IntegerPartitions[n-1]];
    Table[Length[arut[n]],{n,20}]
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    MoebiusT(v)={vector(#v, n, sumdiv(n,d,moebius(n/d)*v[d]))}
    seq(n)={my(v=[1]); for(n=2, n, v=concat([1], MoebiusT(EulerT(v)))); v} \\ Andrew Howroyd, Sep 01 2018

Extensions

Terms a(21) and beyond from Andrew Howroyd, Sep 01 2018

A295935 Number of twice-factorizations of n where the latter factorizations are constant, i.e., type (P,P,R).

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 1, 5, 3, 2, 1, 5, 1, 2, 2, 12, 1, 5, 1, 5, 2, 2, 1, 10, 3, 2, 5, 5, 1, 5, 1, 18, 2, 2, 2, 15, 1, 2, 2, 10, 1, 5, 1, 5, 5, 2, 1, 22, 3, 5, 2, 5, 1, 10, 2, 10, 2, 2, 1, 13, 1, 2, 5, 40, 2, 5, 1, 5, 2, 5, 1, 28, 1, 2, 5, 5, 2, 5, 1, 22, 12, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2017

Keywords

Comments

a(n) is also the number of ways to choose a perfect divisor of each factor in a factorization of n.

Examples

			The a(24) = 10 twice-factorizations are:
(2)*(2)*(2)*(3), (2)*(3)*(2*2), (3)*(2*2*2)
(2)*(2)*(6), (2*2)*(6),
(2)*(3)*(4),
(2)*(12),
(3)*(8),
(4)*(6),
(24).
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Sum[Product[Length[Divisors[GCD@@FactorInteger[d][[All,2]]]],{d,f}],{f,facs[n]}],{n,100}]

Formula

Dirichlet g.f.: 1/Product_{n > 1}(1 - A089723(n)/n^s).

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

A294336 Number of ways to write n as a finite power-tower a^(b^(c^...)) of positive integers greater than one.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2017

Keywords

Comments

Möbius-transform of A294337. - Antti Karttunen, Jun 12 2018

Examples

			The a(4096) = 7 ways are: 2^12, 4^6, 8^4, 8^(2^2), 16^3, 64^2, 4096.
		

Crossrefs

Programs

  • Mathematica
    Array[1+Sum[#0[g],{g,Rest[Divisors[GCD@@FactorInteger[#1][[All,2]]]]}]&,200]
  • PARI
    A052409(n) = { my(k=ispower(n)); if(k, k, n>1); }; \\ From A052409
    A294336(n) = if(1==n,n,sumdiv(A052409(n),d,A294336(d))); \\ Antti Karttunen, Jun 12 2018, after Mathematica-code.

Formula

a(1) = 1; for n > 1, a(n) = Sum_{d|A052409(n)} a(d). - Antti Karttunen, Jun 12 2018, after Mathematica-code.
a(n) = A294337(A052409(n)) for n >= 2. - Pontus von Brömssen, Aug 20 2024

Extensions

More terms from Antti Karttunen, Jun 12 2018

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

A295924 Number of twice-factorizations of n of type (R,P,R).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 4, 3, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, 1, 8, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 30 2017

Keywords

Comments

a(n) is the number of ways to choose an integer partition of a divisor of A052409(n).

Examples

			The a(16) = 8 twice-factorizations are (2)*(2)*(2)*(2), (2)*(2)*(2*2), (2)*(2*2*2), (2*2)*(2*2), (2*2*2*2), (4)*(4), (4*4), (16).
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[GCD@@FactorInteger[n][[All,2]],PartitionsP],{n,100}]
  • PARI
    A052409(n) = { my(k=ispower(n)); if(k, k, n>1); }; \\ From A052409
    A295924(n) = if(1==n,n,sumdiv(A052409(n),d,numbpart(d))); \\ Antti Karttunen, Jul 29 2018

Formula

a(1) = 1; for n > 1, a(n) = Sum_{d|A052409(n)} A000041(d). - Antti Karttunen, Jul 29 2018

Extensions

More terms from Antti Karttunen, Jul 29 2018

A294337 Number of ways to write 2^n as a finite power-tower a^(b^(c^...)) of positive integers greater than one.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 4, 4, 2, 7, 2, 4, 4, 10, 2, 7, 2, 7, 4, 4, 2, 10, 4, 4, 6, 7, 2, 8, 2, 12, 4, 4, 4, 12, 2, 4, 4, 10, 2, 8, 2, 7, 7, 4, 2, 15, 4, 7, 4, 7, 2, 10, 4, 10, 4, 4, 2, 13, 2, 4, 7, 16, 4, 8, 2, 7, 4, 8, 2, 16, 2, 4, 7, 7, 4, 8, 2, 15, 10, 4, 2, 13, 4, 4, 4, 10, 2, 13, 4, 7, 4, 4, 4, 18, 2, 7, 7, 12, 2, 8, 2, 10, 8
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2017

Keywords

Examples

			The a(12) = 7 ways are: 2^12, 4^6, 8^4, 8^(2^2), 16^3, 64^2, 4096.
		

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A294336(d) = A294336(A000079(n)). - Antti Karttunen, Jun 12 2018

Extensions

More terms from Antti Karttunen, Jun 12 2018

A295931 Number of ways to write n in the form n = (x^y)^z where x, y, and z are positive integers.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2017

Keywords

Comments

By convention a(1) = 1.
Values can be 1, 3, 6, 9, 10, 15, 18, 21, 27, 28, 30, 36, 45, 54, 60, 63, 84, 90, etc. - Robert G. Wilson v, Dec 10 2017

Examples

			The a(256) = 10 ways are:
(2^1)^8    (2^2)^4   (2^4)^2  (2^8)^1
(4^1)^4    (4^2)^2   (4^4)^1
(16^1)^2   (16^2)^1
(256^1)^1
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,d,t;
      m:= igcd(seq(t[2],t=ifactors(n)[2]));
      add(numtheory:-tau(d),d=numtheory:-divisors(m))
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Dec 19 2017
  • Mathematica
    Table[Sum[DivisorSigma[0,d],{d,Divisors[GCD@@FactorInteger[n][[All,2]]]}],{n,100}]

Formula

a(A175082(k)) = 1, a(A093771(k)) = 3.
a(n) = Sum_{d|A052409(n)} A000005(d).

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]
Showing 1-10 of 15 results. Next