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.

A351940 a(n) is the number of partitions of the set {1,2,...,n} into lists having a prime number of elements.

Original entry on oeis.org

1, 0, 2, 6, 12, 240, 480, 12600, 62160, 665280, 10009440, 94802400, 1497545280, 23662679040, 317854817280, 5236146115200, 102522189369600, 1772579589580800, 39459091697625600, 809304973699622400, 17463916757211724800, 388537548150495744000
Offset: 0

Views

Author

Seiichi Manyama, Feb 26 2022

Keywords

Examples

			a(2) =   2 : (12) (2! * 1 ways).
a(3) =   6 : (123) (3! * 1 ways).
a(4) =  12 : (12)(34) (2! * 2! * 3 ways).
a(5) = 240 : (12345) (5! * 1 ways), (123)(45) (3! * 2! * 10 ways).
a(6) = 480 : (123)(456) (3! * 3! * 10 ways), (12)(34)(56) (2! * 2! * 2! * 15 ways).
		

Crossrefs

Programs

  • PARI
    my(N=40, x='x+O('x^N)); Vec(serlaplace(exp(sum(k=1, N, isprime(k)*x^k))))
    
  • PARI
    a(n) = if(n==0, 1, sum(k=1, n, isprime(k)*k!*binomial(n-1, k-1)*a(n-k)));

Formula

E.g.f.: Product_{k > 0} exp(x^prime(k)).
E.g.f.: exp(Sum_{k > 0} x^prime(k)).
a(0) = 1; a(n) = Sum_{p<=n, p prime} p! * binomial(n-1,p-1) * a(n-p).