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.

A079122 Number of ways to partition 2*n into distinct positive integers not greater than n.

This page as a plain text file.
%I A079122 #29 Jan 16 2024 11:01:17
%S A079122 1,0,0,1,1,3,5,8,13,21,31,46,67,95,134,186,253,343,461,611,806,1055,
%T A079122 1369,1768,2270,2896,3678,4649,5847,7325,9141,11359,14069,17367,21363,
%U A079122 26202,32042,39068,47512,57632,69728,84167,101365,121801,146053,174777
%N A079122 Number of ways to partition 2*n into distinct positive integers not greater than n.
%H A079122 Alois P. Heinz, <a href="/A079122/b079122.txt">Table of n, a(n) for n = 0..1000</a> (terms n = 0..80 from Reinhard Zumkeller)
%F A079122 a(n) = b(0, n), b(m, n) = 1 + sum(b(i, j): m<i<j<n & i+j=2*n).
%F A079122 Coefficient of x^(2*n) in Product_{k=1..n} (1+x^k). - _Vladeta Jovovic_, Aug 07 2003
%F A079122 a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(11/4) * 3^(1/4) * n^(3/4)). - _Vaclav Kotesovec_, Oct 22 2015
%e A079122 a(4)=1 [1+3+4=2*4]; a(5)=3 [1+2+3+4=1+4+5=2+3+5=2*5].
%p A079122 b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
%p A079122        b(n, i-1) + `if`(i>n, 0, b(n-i, i-1))))
%p A079122     end:
%p A079122 a:= n-> b(2*n, n):
%p A079122 seq(a(n), n=0..80);  # _Alois P. Heinz_, Jan 18 2013
%t A079122 d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@ #] == 1 &]; Table[d[n], {n, 1, 12}]
%t A079122 TableForm[%]
%t A079122 f[n_] := Length[Select[d[2 n], First[#] <= n &]]
%t A079122 Table[f[n], {n, 1, 20}]  (* A079122 *)
%t A079122 (* _Clark Kimberling_, Mar 13 2012 *)
%t A079122 b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i-1]]]]; a[n_] := b[2*n, n]; Table[a[n], {n, 0, 80}] (* _Jean-François Alcover_, Oct 22 2015, after _Alois P. Heinz_ *)
%t A079122 Table[SeriesCoefficient[Product[1 + x^(k/2), {k, 1, n}], {x, 0, n}], {n, 0, 50}] (* _Vaclav Kotesovec_, Jan 16 2024 *)
%o A079122 (Haskell)
%o A079122 a079122 n = p [1..n] (2 * n) where
%o A079122    p _  0     = 1
%o A079122    p [] _     = 0
%o A079122    p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
%o A079122 -- _Reinhard Zumkeller_, Mar 16 2012
%Y A079122 Cf. A035294, A079126, A000009, A079124, A079125, A067953, A111133.
%K A079122 nonn
%O A079122 0,6
%A A079122 _Reinhard Zumkeller_, Dec 27 2002