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

A252654 Number of multisets of nonempty words with a total of n letters over n-ary alphabet.

Original entry on oeis.org

1, 1, 7, 64, 843, 13876, 276792, 6438797, 170938483, 5091463423, 167965714273, 6074571662270, 238837895468954, 10138497426332796, 461941179848628434, 22478593443737857695, 1163160397700757351363, 63760710281671647692688, 3690276585886363643056992
Offset: 0

Views

Author

Alois P. Heinz, Dec 19 2014

Keywords

Examples

			a(2) = 7: {aa}, {ab}, {ba}, {bb}, {a,a}, {a,b}, {b,b}.
		

Crossrefs

Main diagonal of A144074.

Programs

  • Maple
    with(numtheory):
    A:= proc(n, k) option remember; `if`(n=0, 1, add(add(
           d*k^d, d=divisors(j)) *A(n-j, k), j=1..n)/n)
        end:
    a:= n-> A(n$2):
    seq(a(n), n=0..25);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[Sum[d*k^d, {d, Divisors[j]}]*A[n - j, k], {j, 1, n}]/n];
    a[n_] := A[n, n];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 21 2017, translated from Maple *)

Formula

a(n) = [x^n] Product_{j>=1} 1/(1-x^j)^(n^j).
a(n) = n-th term of the Euler transform of the powers of n.
a(n) ~ n^(n-3/4) * exp(2*sqrt(n) - 1/2) / (2*sqrt(Pi)). - Vaclav Kotesovec, Mar 14 2015
a(n) = [x^n] exp(n*Sum_{k>=1} x^k/(k*(1 - n*x^k))). - Ilya Gutkovskiy, Nov 20 2018

Extensions

New name from comment by Alois P. Heinz, Sep 21 2018

A292845 Total number of words beginning with the first letter of an n-ary alphabet in all sets of nonempty words with a total of n letters.

Original entry on oeis.org

0, 1, 3, 28, 325, 4976, 92869, 2038842, 51397801, 1461081781, 46192638386, 1606531631321, 60921659773609, 2500525907856718, 110403919405245712, 5216038547426332891, 262495788417549517393, 14015335940464667636300, 791161963786588958170705
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2017

Keywords

Examples

			For n=2 and alphabet {a,b} we have 5 sets: {aa}, {ab}, {ba}, {bb}, {a,b}. There is a total of 3 words beginning with the first alphabet letter, thus a(2) = 3.
		

Crossrefs

Programs

  • Maple
    h:= proc(n, i, k) option remember; `if`(n=0, [1, 0], `if`(i<1, 0, add(
         (p-> p+[0, p[1]*j])(binomial(k^i, j)*h(n-i*j, i-1, k)), j=0..n/i)))
        end:
    a= n-> `if`(n=0, 0, h(n$3)[2]/n):
    seq(a(n), n=0..22);
  • Mathematica
    h[n_, i_, k_] := h[n, i, k] = If[n == 0, {1, 0}, If[i < 1, {0, 0}, Sum[ Function[p, p + {0, p[[1]]*j}][Binomial[k^i, j]*h[n - i*j, i - 1, k]], {j, 0, n/i}]]];
    a[n_] := If[n == 0, 0, h[n, n, n][[2]]/n];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Mar 19 2022, after Alois P. Heinz *)
Showing 1-2 of 2 results.