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.

A111752 Number of partitions of {1,..,n} into lists with an even number of lists of size 1, where a list means an ordered subset (cf. A000262).

This page as a plain text file.
%I A111752 #31 Dec 01 2021 09:26:36
%S A111752 1,0,3,6,49,300,2491,22890,239457,2782584,35595091,496577070,
%T A111752 7499663953,121855323876,2118793593099,39245026343250,771255810671041,
%U A111752 16025261292247920,350956070419872547,8078570913162379734,194969375055353840241,4922311437793379501340
%N A111752 Number of partitions of {1,..,n} into lists with an even number of lists of size 1, where a list means an ordered subset (cf. A000262).
%C A111752 a(n) + A111753(n) = A000262(n). - _David Wasserman_, Feb 11 2009
%H A111752 Alois P. Heinz, <a href="/A111752/b111752.txt">Table of n, a(n) for n = 0..444</a>
%F A111752 E.g.f.: cosh(x)*exp(x^2/(1-x)). More generally, e.g.f. for number of partitions of {1, 2, ...n} into lists with an even number of lists of size k is cosh(x^k)*exp(x/(1-x)-x^k).
%F A111752 E.g.f.: cosh(x)*exp(x^2/(1-x)) = 1/2*Q(0); Q(k) = 1+((2*x-1)^k)/(1-x/(x+((2*x-1)^k)*(k+1)*(1-x)/Q(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, Nov 17 2011
%F A111752 a(n) ~ (exp(1)+exp(-1)) * 2^(-3/2) * exp(2*sqrt(n)-n-3/2) * n^(n-1/4) * (1 + (2/(1 + exp(2)) - 5/48)/sqrt(n)). - _Vaclav Kotesovec_, Jan 21 2017, extended Dec 01 2021
%p A111752 b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
%p A111752      `if`(j=1, 1-t, t))*binomial(n-1, j-1)*j!, j=1..n))
%p A111752     end:
%p A111752 a:= n-> b(n, 1):
%p A111752 seq(a(n), n=0..30);  # _Alois P. Heinz_, May 10 2016
%t A111752 b[n_, t_] := b[n, t] = If[n == 0, t, Sum[b[n-j, If[j == 1, 1-t, t]] * Binomial[n-1, j-1]*j!, {j, 1, n}]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Jan 21 2017, after _Alois P. Heinz_ *)
%o A111752 (Python)
%o A111752 from sympy.core.cache import cacheit
%o A111752 from sympy import binomial, factorial as f
%o A111752 @cacheit
%o A111752 def b(n, t): return t if n==0 else sum(b(n - j, (1 - t if j==1 else t))*binomial(n - 1, j - 1)*f(j) for j in range(1, n + 1))
%o A111752 def a(n): return b(n, 1)
%o A111752 print([a(n) for n in range(51)]) # _Indranil Ghosh_, Aug 10 2017
%Y A111752 Cf. A000262, A113235, A063083, A062282, A111723, A111724, A111753.
%K A111752 easy,nonn
%O A111752 0,3
%A A111752 _Vladeta Jovovic_, Nov 19 2005; corrected Jun 06 2006
%E A111752 More terms from _David Wasserman_, Feb 11 2009
%E A111752 a(0)=1 prepended by _Alois P. Heinz_, May 10 2016