(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Give a big-O estimate of the product of the first n odd

positive integers.

2. Relevant equations

Big-O notation:

f(x) is O(g(x)) if there are constants C and k such that

|f(x)| ≤ C|g(x)| whenever x > k.

3. The attempt at a solution

The product of the first n odd integers can be given by:

[tex]P(n)=1\times 3\times 5\times 7\times...\times (2n-1)[/tex]

For n > 0, no element in the above sequence will be greater than (2n-1). Thus:

[tex]1\times 3\times 5\times 7\times...\times (2n-1)\leq (2n-1)\times (2n-1)...\times (2n-1)=(2n-1)^n[/tex]

So:

P(n) ≤ (2n-1)^{n}whenever n > 0

I could stop here and say that

P(n) is O((2n-1)^{n})

But to simplify I think I could consider that:

P(n) ≤ (2n-1)^{n}≤ (2n)^{n}

Thus,

P(n) is O((2n)^{n})

Is this reasoning correct?

Thank you in advance.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Give a big-O estimate of the product of the first n odd positive integers

**Physics Forums | Science Articles, Homework Help, Discussion**