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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115107 Numerator of q_n = -4n + 2(1+n)*HarmonicNumber(n). 3
0, 1, 8, 29, 37, 103, 472, 2369, 2593, 30791, 32891, 452993, 476753, 499061, 2080328, 18358463, 18999103, 124184839, 127860511, 26274175, 8982005, 211524139, 648798629, 16562041459, 16891532467, 154883957203, 157646059403, 4649180818987, 4724140023307 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Average time to quicksort n items in random order.

REFERENCES

P. J. Cameron, Combinatorics, Cambridge Univ. Press, 1996, see p. 68.

M. Kauers and P. Paule, The Concrete Tetrahedron, Springer 2011, p. 4.

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000

Eric Weisstein's World of Mathematics, Quicksort

EXAMPLE

0, 1, 8/3, 29/6, 37/5, 103/10, 472/35, 2369/140, 2593/126, ...

MATHEMATICA

f[n_] := Numerator[ -4n + 2(n + 1)HarmonicNumber[n]]; Array[f, 29] (* Robert G. Wilson v, May 01 2006 *)

PROG

(PARI) {h(n) = sum(k=1, n, 1/k)};

for(n=1, 30, print1(numerator(-4*n + 2*(n+1)*h(n)), ", ")) \\ G. C. Greubel, Sep 01 2018

(MAGMA) [Numerator(-4*n + 2*(n+1)*HarmonicNumber(n)): n in [1..30]]; // G. C. Greubel, Sep 01 2018

CROSSREFS

Cf. A093418, A096620.

Sequence in context: A298490 A299183 A155578 * A298217 A299093 A299875

Adjacent sequences:  A115104 A115105 A115106 * A115108 A115109 A115110

KEYWORD

nonn,frac

AUTHOR

N. J. A. Sloane, Mar 07 2006

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 October 20 00:56 EDT 2018. Contains 316378 sequences. (Running on oeis4.)