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

A038041 Number of ways to partition an n-set into subsets of equal size.

Original entry on oeis.org

1, 2, 2, 5, 2, 27, 2, 142, 282, 1073, 2, 32034, 2, 136853, 1527528, 4661087, 2, 227932993, 2, 3689854456, 36278688162, 13749663293, 2, 14084955889019, 5194672859378, 7905858780927, 2977584150505252, 13422745388226152, 2, 1349877580746537123, 2
Offset: 1

Views

Author

Keywords

Comments

a(n) = 2 iff n is prime with a(p) = card{ 1|2|3|...|p-1|p, 123...p } = 2. - Bernard Schott, May 16 2019

Examples

			a(4) = card{ 1|2|3|4, 12|34, 14|23, 13|24, 1234 } = 5.
From _Gus Wiseman_, Jul 12 2019: (Start)
The a(6) = 27 set partitions:
  {{1}{2}{3}{4}{5}{6}}  {{12}{34}{56}}  {{123}{456}}  {{123456}}
                        {{12}{35}{46}}  {{124}{356}}
                        {{12}{36}{45}}  {{125}{346}}
                        {{13}{24}{56}}  {{126}{345}}
                        {{13}{25}{46}}  {{134}{256}}
                        {{13}{26}{45}}  {{135}{246}}
                        {{14}{23}{56}}  {{136}{245}}
                        {{14}{25}{36}}  {{145}{236}}
                        {{14}{26}{35}}  {{146}{235}}
                        {{15}{23}{46}}  {{156}{234}}
                        {{15}{24}{36}}
                        {{15}{26}{34}}
                        {{16}{23}{45}}
                        {{16}{24}{35}}
                        {{16}{25}{34}}
(End)
		

Crossrefs

Cf. A061095 (same but with labeled boxes), A005225, A236696, A055225, A262280, A262320.
Column k=1 of A208437.
Row sums of A200472 and A200473.
Cf. A000110, A007837 (different lengths), A035470 (equal sums), A275780, A317583, A320324, A322794, A326512 (equal averages), A326513.

Programs

  • Maple
    A038041 := proc(n) local d;
    add(n!/(d!*(n/d)!^d), d = numtheory[divisors](n)) end:
    seq(A038041(n),n = 1..29); # Peter Luschny, Apr 16 2011
  • Mathematica
    a[n_] := Block[{d = Divisors@ n}, Plus @@ (n!/(#! (n/#)!^#) & /@ d)]; Array[a, 29] (* Robert G. Wilson v, Apr 16 2011 *)
    Table[Sum[n!/((n/d)!*(d!)^(n/d)), {d, Divisors[n]}], {n, 1, 31}] (* Emanuele Munarini, Jan 30 2014 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],SameQ@@Length/@#&]],{n,0,8}] (* Gus Wiseman, Jul 12 2019 *)
  • Maxima
    a(n):= lsum(n!/((n/d)!*(d!)^(n/d)),d,listify(divisors(n)));
    makelist(a(n),n,1,40); /* Emanuele Munarini, Feb 03 2014 */
    
  • PARI
    /* compare to A061095 */
    mnom(v)=
    /* Multinomial coefficient s! / prod(j=1, n, v[j]!) where
      s= sum(j=1, n, v[j]) and n is the number of elements in v[]. */
    sum(j=1, #v, v[j])! / prod(j=1, #v, v[j]!)
    A038041(n)={local(r=0);fordiv(n,d,r+=mnom(vector(d,j,n/d))/d!);return(r);}
    vector(33,n,A038041(n)) /* Joerg Arndt, Apr 16 2011 */
    
  • Python
    import math
    def a(n):
        count = 0
        for k in range(1, n + 1):
            if n % k == 0:
                count += math.factorial(n) // (math.factorial(k) ** (n // k) * math.factorial(n // k))
        return count # Paul Muljadi, Sep 25 2024

Formula

a(n) = Sum_{d divides n} (n!/(d!*((n/d)!)^d)).
E.g.f.: Sum_{k >= 1} (exp(x^k/k!)-1).

Extensions

More terms from Erich Friedman

A078308 a(n) = Sum_{d divides n} d^(n/d + 1).

Original entry on oeis.org

1, 5, 10, 25, 26, 80, 50, 161, 163, 290, 122, 988, 170, 796, 1580, 2305, 290, 5561, 362, 10670, 9404, 5912, 530, 58436, 16251, 19258, 66340, 118640, 842, 381740, 962, 431105, 547172, 268214, 509500, 3534037, 1370, 1056880, 4813052, 8616326, 1682
Offset: 1

Views

Author

Vladeta Jovovic, Nov 22 2002

Keywords

Crossrefs

Programs

  • Maple
    A078308 := proc(n)
            add( d^(n/d+1),d=numtheory[divisors](n)) ;
    end proc:
    seq(A078308(n),n=1..10) ; # R. J. Mathar, Dec 14 2011
  • Mathematica
    Table[CoefficientList[Series[-Log[Product[(1 - k x^k), {k, 1, 60}]], {x, 0, 60}],x][[n + 1]] (n), {n, 1, 60}] (* Benedict W. J. Irwin, Jul 04 2016 *)
    Table[Total[#^(n/#+1)&/@Divisors[n]],{n,50}] (* Harvey P. Dale, Aug 02 2025 *)
  • PARI
    a(n) = sumdiv(n, d, d^(n/d+1)); \\ Michel Marcus, Jul 04 2016
    
  • PARI
    N=66; x='x+O('x^N); Vec(x*deriv(-log(prod(k=1, N, 1-k*x^k)))) \\ Seiichi Manyama, Jun 02 2019

Formula

G.f.: Sum_{n>0} n^2*x^n/(1-n*x^n).
L.g.f.: -log(Product_{ k>0 } (1-k*x^k)) = Sum_{ n>=0 } (a(n)/n)*x^n. - Benedict W. J. Irwin, Jul 04 2016

A005225 Number of permutations of length n with equal cycles.

Original entry on oeis.org

1, 2, 3, 10, 25, 176, 721, 6406, 42561, 436402, 3628801, 48073796, 479001601, 7116730336, 88966701825, 1474541093026, 20922789888001, 400160588853026, 6402373705728001, 133991603578884052, 2457732174030848001, 55735573291977790576, 1124000727777607680001
Offset: 1

Views

Author

Keywords

Examples

			For example, a(4)=10 since, of the 24 permutations of length 4, there are 6 permutations with consist of a single 4-cycle, 3 permutations that consist of two 2-cycles and 1 permutation with four 1-cycles.
Also, a(7)=721 since there are 720 permutations with a single cycle of length 7 and 1 permutation with seven 1-cycles.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • D. P. Walsh, A differentiation-based characterization of primes, Abstracts Amer. Math. Soc., 25 (No. 2, 2002), p. 339, #975-11-237.

Crossrefs

Column k=1 of A218868.
Column k=0 of A364967 (for n>=1).

Programs

  • Maple
    a:= n-> n!*add((d/n)^d/d!, d=numtheory[divisors](n)):
    seq(a(n), n=1..30);  # Alois P. Heinz, Nov 07 2012
  • Mathematica
    Table[n! Sum[((n/d)!*d^(n/d))^(-1), {d, Divisors[n]}], {n, 21}] (* Jean-François Alcover, Apr 04 2011 *)
  • Maxima
    a(n):= n!*lsum((d!*(n/d)^d)^(-1),d,listify(divisors(n)));
    makelist(a(n),n,1,40); /* Emanuele Munarini, Feb 03 2014 */

Formula

a(n) = n!*sum(((n/k)!*k^(n/k))^(-1)) where sum is over all divisors k of n. Exponential generating function [for a(1) through a(n)]= sum(exp(t^k/k)-1, k=1..n).
a(n) = (n-1)! + 1 iff n is a prime.

Extensions

Additional comments from Dennis P. Walsh, Dec 08 2000
More terms from Vladeta Jovovic, Dec 01 2001

A087909 a(n) = Sum_{d|n} (n/d)^(d-1).

Original entry on oeis.org

1, 2, 2, 4, 2, 9, 2, 14, 11, 23, 2, 83, 2, 73, 108, 202, 2, 546, 2, 905, 780, 1037, 2, 5553, 627, 4111, 6644, 12647, 2, 40605, 2, 49682, 59172, 65555, 18028, 382424, 2, 262165, 531612, 869675, 2, 2706581, 2, 3147083, 5180382, 4194329, 2, 27246533, 117651
Offset: 1

Views

Author

Vladeta Jovovic, Oct 15 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:= DivisorSum[n, (n/#)^(#-1) &]; Array[a, 30] (* G. C. Greubel, May 16 2018 *)
  • PARI
    a(n)=sumdiv(n, d, d^(n/d-1) );  /* Joerg Arndt, Oct 07 2012 */
    
  • PARI
    N=66; x='x+O('x^N); Vec(x*deriv(-log(prod(k=1, N, (1-k*x^k)^(1/k^2))))) \\ Seiichi Manyama, Jun 17 2019

Formula

G.f.: Sum_{k>0} x^k/(1-k*x^k).
From Seiichi Manyama, Jun 17 2019: (Start)
L.g.f.: -log(Product_{k>=1} (1 - k*x^k)^(1/k^2)) = Sum_{k>=1} a(k)*x^k/k.
a(p) = 2 for prime p. (End)

A324158 Expansion of Sum_{k>=1} x^k / (1 - k * x^k)^k.

Original entry on oeis.org

1, 2, 2, 6, 2, 23, 2, 50, 56, 107, 2, 660, 2, 499, 1592, 2370, 2, 8246, 2, 18557, 21786, 11387, 2, 175198, 43752, 53419, 298892, 487762, 2, 1891098, 2, 2552066, 3905222, 1114403, 3785462, 29081597, 2, 4981099, 48376512, 95510772, 2, 218764940, 2, 346411232, 770590352
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 02 2019

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 45; CoefficientList[Series[Sum[x^k/(1 - k x^k)^k, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[Sum[(n/d)^(d - 1) Binomial[n/d + d - 2, d - 1], {d, Divisors[n]}], {n, 1, 45}]
  • PARI
    a(n) = sumdiv(n, d, (n/d)^(d-1) * binomial(n/d+d-2, d-1)); \\ Michel Marcus, Sep 02 2019
    
  • PARI
    N=66; x='x+O('x^N); Vec(sum(k=1, N, x^k/(1-k*x^k)^k)) \\ Seiichi Manyama, Sep 03 2019

Formula

a(n) = Sum_{d|n} (n/d)^(d-1) * binomial(n/d+d-2,d-1).
a(p) = 2, where p is prime.

A167531 a(n) = Sum_{d divides n} d*(n/d)^(d-1).

Original entry on oeis.org

1, 3, 4, 9, 6, 25, 8, 49, 37, 101, 12, 373, 14, 477, 496, 1313, 18, 3907, 20, 6941, 5272, 11309, 24, 49321, 3151, 53301, 59320, 144789, 30, 468181, 32, 657473, 649936, 1114181, 121416, 5124961, 38, 4980813, 6909280, 13756761, 42, 44768725, 44
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    a(n)=sumdiv(n,d,d*(n/d)^(d-1))
    
  • PARI
    N=66; x='x+O('x^N); Vec(sum(k=1, N, x^k/(1-k*x^k)^2)) \\ Seiichi Manyama, Sep 03 2019

Formula

G.f.: Sum{k>0} x^k/(1-k*x^k)^2.

A236696 Number of forests on n vertices consisting of labeled rooted trees of the same size.

Original entry on oeis.org

1, 3, 10, 77, 626, 8707, 117650, 2242193, 43250842, 1049248991, 25937424602, 772559330281, 23298085122482, 817466439388341, 29223801257127976, 1181267018656911617, 48661191875666868482, 2232302772999145783735, 104127350297911241532842
Offset: 1

Views

Author

Emanuele Munarini, Jan 30 2014

Keywords

Examples

			For n = 3 we have the following 10 forests (where the roots are denoted by ^):
                              3  2  3  1  2  1
                              |  |  |  |  |  |
         2   3  1   3  1   2  2  3  1  3  1  2
          \ /    \ /    \ /   |  |  |  |  |  |
  1 2 3    1      2      3    1  1  2  2  3  3
  ^ ^ ^,   ^,     ^,     ^,   ^, ^, ^, ^, ^, ^
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[n!/(n/d)!*(d^(d-1)/d!)^(n/d), {d,Divisors[n]}], {n,1,100}]
  • Maxima
    a(n):= lsum(n!/(n/d)!*(d^(d-1)/d!)^(n/d),d,listify(divisors(n))); makelist(a(n),n,1,40); /* Emanuele Munarini, Feb 03 2014 */

Formula

a(n) = sum(d divides n, n!/(n/d)!*(d^(d-1)/d!)^(n/d) ).
E.g.f.: sum(k>=1, exp(k^(k-1)*x^k/k!)).

A294462 Expansion of e.g.f. Product_{k>0} (1-k*x^k)^(-1/k).

Original entry on oeis.org

1, 1, 4, 18, 132, 900, 10080, 93240, 1285200, 16526160, 264600000, 3950100000, 81280584000, 1401728328000, 30861115084800, 663835444272000, 16425316331424000, 380082583808928000, 10885891543502976000, 279441709690118976000, 8697410321979899520000
Offset: 0

Views

Author

Seiichi Manyama, Oct 31 2017

Keywords

Crossrefs

Column k=1 of A294761.

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(1/prod(k=1, N, (1-k*x^k)^(1/k))))

Formula

a(0) = 1 and a(n) = (n-1)! * Sum_{k=1..n} A055225(k)*a(n-k)/(n-k)! for n > 0.
E.g.f.: exp(Sum_{k>=1} Sum_{j>=1} j^(k-1)*x^(j*k)/k). - Ilya Gutkovskiy, May 28 2018

A324159 Expansion of Sum_{k>=1} k * x^k / (1 - k * x^k)^k.

Original entry on oeis.org

1, 3, 4, 13, 6, 58, 8, 137, 172, 296, 12, 2063, 14, 1254, 5536, 7697, 18, 25201, 20, 68976, 70862, 23882, 24, 607485, 218776, 108720, 918568, 1810089, 30, 6746147, 32, 9408545, 11779582, 2233172, 19935756, 102405280, 38, 9968370, 145283360, 393585971, 42, 730233631, 44, 1296043651, 2718300016
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 02 2019

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 45; CoefficientList[Series[Sum[k x^k/(1 - k x^k)^k, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[Sum[(n/d)^d Binomial[n/d + d - 2, d - 1], {d, Divisors[n]}], {n, 1, 45}]
  • PARI
    a(n) = sumdiv(n, d, (n/d)^d * binomial(n/d+d-2, d-1)); \\ Michel Marcus, Sep 02 2019
    
  • PARI
    N=66; x='x+O('x^N); Vec(sum(k=1, N, k*x^k/(1-k*x^k)^k)) \\ Seiichi Manyama, Sep 03 2019

Formula

a(n) = Sum_{d|n} (n/d)^d * binomial(n/d+d-2,d-1).
a(p) = p + 1, where p is prime.

A342629 a(n) = Sum_{d|n} (n/d)^(n-d).

Original entry on oeis.org

1, 3, 10, 69, 626, 7866, 117650, 2101265, 43047451, 1000390658, 25937424602, 743069105634, 23298085122482, 793728614541474, 29192926269590300, 1152925902670135553, 48661191875666868482, 2185913413229070900339, 104127350297911241532842
Offset: 1

Views

Author

Seiichi Manyama, Mar 16 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, (n/#)^(n - #) &]; Array[a, 20] (* Amiram Eldar, Mar 17 2021 *)
  • PARI
    a(n) = sumdiv(n, d, (n/d)^(n-d));
    
  • PARI
    my(N=20, x='x+O('x^N)); Vec(sum(k=1, N, k^(k-1)*x^k/(1-k^(k-1)*x^k)))
    
  • Python
    from sympy import divisors
    def A342629(n): return sum((n//d)**(n-d) for d in divisors(n,generator=True)) # Chai Wah Wu, Jun 19 2022

Formula

G.f.: Sum_{k>=1} k^(k-1) * x^k/(1 - k^(k-1) * x^k).
If p is prime, a(p) = 1 + p^(p-1).
Showing 1-10 of 45 results. Next