login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079122 Number of ways to partition 2*n into distinct positive integers not greater than n. 7
1, 0, 0, 1, 1, 3, 5, 8, 13, 21, 31, 46, 67, 95, 134, 186, 253, 343, 461, 611, 806, 1055, 1369, 1768, 2270, 2896, 3678, 4649, 5847, 7325, 9141, 11359, 14069, 17367, 21363, 26202, 32042, 39068, 47512, 57632, 69728, 84167, 101365, 121801, 146053, 174777 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

LINKS

Reinhard Zumkeller and Alois P. Heinz, Table of n, a(n) for n = 0..1000 (terms 0..80 from Reinhard Zumkeller)

FORMULA

a(n) = b(0, n), b(m, n) = 1 + sum(b(i, j): m<i<j<n & i+j=2*n).

Coefficient of x^(2*n) in Product_{k=1..n} (1+x^k). - Vladeta Jovovic, Aug 07 2003

a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(11/4) * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Oct 22 2015

EXAMPLE

a(4)=1 [1+3+4=2*4]; a(5)=3 [1+2+3+4=1+4+5=2+3+5=2*5].

MAPLE

b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,

       b(n, i-1) + `if`(i>n, 0, b(n-i, i-1))))

    end:

a:= n-> b(2*n, n):

seq(a(n), n=0..80);  # Alois P. Heinz, Jan 18 2013

MATHEMATICA

d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@ #] == 1 &]; Table[d[n], {n, 1, 12}]

TableForm[%]

f[n_] := Length[Select[d[2 n], First[#] <= n &]]

Table[f[n], {n, 1, 20}]  (* A079122 *)

(* Clark Kimberling, Mar 13 2012 *)

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 *)

PROG

(Haskell)

a079122 n = p [1..n] (2 * n) where

   p _  0     = 1

   p [] _     = 0

   p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m

-- Reinhard Zumkeller, Mar 16 2012

CROSSREFS

Cf. A035294, A079126, A000009, A079124, A079125, A067953, A111133.

Sequence in context: A227547 A163685 A080614 * A265069 A265070 A071679

Adjacent sequences:  A079119 A079120 A079121 * A079123 A079124 A079125

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Dec 27 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 27 11:14 EDT 2017. Contains 287204 sequences.