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-3 of 3 results.

A178682 The number of functions f:{1,2,...,n}->{1,2,...,n} such that the number of elements that are mapped to m is divisible by m.

Original entry on oeis.org

1, 1, 2, 5, 13, 42, 150, 576, 2266, 9966, 47466, 237019, 1224703, 6429152, 35842344, 212946552, 1325810173, 8488092454, 55276544436, 362961569008, 2465240278980, 17538501945077, 130454679958312, 1002493810175093, 7838007702606372, 61789072382062638
Offset: 0

Views

Author

Geoffrey Critzer, Dec 25 2010

Keywords

Comments

a(n) is also the number of partitions of n where each block of part i with multiplicity j is marked with a word of length i*j over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the partition. a(3) = 5: 3abc, 2ab1c, 2ac1b, 2bc1a, 111abc. There is a simple bijection between the marked partitions and the functions f. - Alois P. Heinz, Aug 30 2015

Examples

			a(3) = 5 because there are 5 such functions: (1,1,1), (1,2,2), (2,1,2), (2,2,1), (3,3,3).
G.f. = 1 + x + 2*x^2 + 5*x^3 + 13*x^4 + 42*x^5 + 150*x^6 + 576*x^7 + ...
		

Crossrefs

Main diagonal of A326500, A326616, A326617.
Row sums of A364285, A364310.

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (&*[(&+[x^(k*j)/Factorial(k*j): k in [0..m]]): j in [1..m]]) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jan 26 2019
    
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*binomial(n, i*j), j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 30 2015
  • Mathematica
    Range[0,20]! CoefficientList[Series[Product[Sum[x^(j i)/(j i)!,{i,0,20}],{j,1,20}],{x,0,20}],x]
  • PARI
    m=30; my(x='x+O('x^m)); Vec(serlaplace(prod(j=1, m, sum(k=0,m, x^(k*j)/(k*j)!)))) \\ G. C. Greubel, Jan 26 2019
    
  • Sage
    m = 30; T = taylor(product(sum(x^(k*j)/factorial(k*j) for k in (0..m)) for j in (1..m)), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, Jan 26 2019

Formula

E.g.f.: Product_{j>=1} Sum_{i>=0} x^(j*i)/(j*i)!.

Extensions

a(21)-a(25) from Alois P. Heinz, Aug 30 2015

A261777 Number of compositions of n where the (possibly scattered) maximal subsequence of part i with multiplicity j is marked with i words of length j over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the composition.

Original entry on oeis.org

1, 1, 3, 19, 115, 951, 10281, 116313, 1436499, 20203795, 338834053, 5824666893, 108142092169, 2118605140237, 44375797806315, 1039641056342619, 25413053107195539, 646983321301050147, 17311013062443870681, 481282277347815404745, 13913039361920333694165
Offset: 0

Views

Author

Alois P. Heinz, Aug 31 2015

Keywords

Examples

			a(3) = 19: 3a|b|c, 3a|c|b, 3b|a|c, 3b|c|a, 3c|a|b, 3c|b|a, 2a|b1c, 2b|a1c, 2a|c1b, 2c|a1b, 2b|c1a, 2c|b1a, 1a2b|c, 1a2c|b, 1b2a|c, 1b2c|a, 1c2a|b, 1c2b|a, 111abc.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0, add(
          b(n-i*j, i-1, p+j)/j!*multinomial(n, n-i*j, j$i), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..25);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i<1, 0, Sum[b[n - i*j, i-1, p + j]/j!*multinomial[n, Join[{n - i*j}, Table[j, {i}]]], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 04 2022, after Alois P. Heinz *)

A327677 Number of colored compositions of n using all colors of an n-set such that any part i has a color pattern of i (distinct) colors in increasing order.

Original entry on oeis.org

1, 1, 3, 13, 71, 481, 3861, 35743, 373591, 4347103, 55671713, 777540523, 11754153869, 191114449579, 3324296885339, 61575268263193, 1209681079172663, 25116819005925409, 549458325556099551, 12629191765880480035, 304232436498153748441, 7663883684722855430077
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2019

Keywords

Examples

			a(3) = 13: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a.
		

Crossrefs

Cf. A261774.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j)*binomial(n, i*j), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..23);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0,
         Sum[b[n - i*j, i - 1, p + j]*Binomial[n, i*j], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Aug 01 2021, after Alois P. Heinz *)
Showing 1-3 of 3 results.