Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A056971
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A056971 Number of heaps on n elements. +0
4
1, 1, 1, 2, 3, 8, 20, 80, 210, 896, 3360, 19200, 79200, 506880, 2745600, 21964800, 108108000, 820019200, 5227622400, 48881664000, 319258368000, 3143467008000, 25540669440000, 299677188096000, 2261626278912000, 25732281217843200, 241240136417280000 (list; graph; listen)
OFFSET

0,4

COMMENT

A sequence {a_i}_{i=1}^N forms a (binary) heap if is satisfies a_i<a_{2i} and a_i<a_{2i+1} for 1<=i<=(N-1)/2

Proof of recurrence: a_1 must take the greatest of the n values. Deleting a_1 gives 2 heaps of size b+r1, b+r2. - Sascha Kurz (sascha.kurz(AT)uni-bayreuth.de), Mar 24 2002

Note that A132862(n)*a(n) = n!. - Alois P. Heinz (heinz(AT)hs-heilbronn.de), Nov 22 2007

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..100

Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.

EXAMPLE

There is 1 heap if n is in {0,1,2}, 2 heaps for n=3, 3 heaps for n=4, and so on.

MAPLE

a[0] := 1: a[1] := 1:

for n from 2 to 50 do

h := floor(simplify(log(n+1)/log(2)))-1:

b := 2^h-1: r := n-1-2*b: r1 := r-floor(r/2^h)*(r-2^h): r2 := r-r1:

a[n] := binomial(n-1, b+r1)*a[b+r1]*a[b+r2]:end do:

q := seq(a[j], j=0..50); [Corrected Maple prgram from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Nov 22 2007]

CROSSREFS

Cf. A056972, A132862.

Sequence in context: A073268 A073190 A066051 this_sequence A108125 A118854 A137652

Adjacent sequences: A056968 A056969 A056970 this_sequence A056972 A056973 A056974

KEYWORD

nonn

AUTHOR

Eric Weisstein (eric(AT)weisstein.com)

EXTENSIONS

More terms from Sascha Kurz (sascha.kurz(AT)uni-bayreuth.de), Mar 24 2002

Offset corrected by Alois P. Heinz (heinz(AT)hs-heilbronn.de), Nov 21 2007

Sequence corrected by Alois P. Heinz (heinz(AT)hs-heilbronn.de), Nov 22 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research