# Maximum value of a_n

1. Jan 29, 2013

### Saitama

1. The problem statement, all variables and given/known data
(These may not be the exact wordings as it was asked by my friend and I do not have the exact question)
Find the value of n for which a_n is maximum where
$$a_n=\frac{1000^n}{n!}$$

(Ans: n=999)

2. Relevant equations

3. The attempt at a solution
I don't think using calculus in this type of question would help so I have put it in Precalc section. I am clueless here, how should I begin with this.

2. Jan 29, 2013

### CompuChip

You could try looking at $$\frac{a_{n + 1}}{a_n}$$

3. Jan 29, 2013

### rollingstein

I took log of both sides and then used the Stirling Approximation.

Then differentiate with respect to n and set that to zero.

I get n=1000 (but there must be some ugliness because of the discontinuity etc.)

4. Jan 29, 2013

### CompuChip

If you follow my hint, you will find a cleaner approach.

5. Jan 29, 2013

### Saitama

This is equal to $\frac{1000}{n+1}$.
But I am still clueless.

6. Jan 29, 2013

### rollingstein

If the series in increasing what's the value of the ratio. If it is decreasing what's the value of the ratio?

@CompuChip: Yes, that's cleaner.

7. Jan 29, 2013

### rollingstein

In any case shouldn't 999 and 1000 both be acceptable answers?

8. Jan 29, 2013

### Saitama

If the series increases,its greater than 1 and less than 1 if it decreases.

9. Jan 29, 2013

### rollingstein

You still don't see the answer?

10. Jan 29, 2013

### Saitama

Honestly, no.

11. Jan 29, 2013

### CompuChip

So what happens at the maximum?

12. Jan 29, 2013

### Saitama

Can you tell me to which area of mathematics these type of questions belong?

13. Jan 29, 2013

### Saitama

@CompuChip: Sorry if this is annoying you but I really have no idea.

14. Jan 29, 2013

### CompuChip

Look at the bit that I quoted: you say that if the series is increasing, then the ratio between consecutive elements is > 1. If it is decreasing, then the ratio is < 1.

Now imagine a series with a maximum. Draw one on a piece of paper, if it helps. What can you say about the increasing / decreasing on either side of the maximum? What does that tell you about the ratio "at" the maximum?

15. Jan 29, 2013

### Saitama

Before the maximum, series increases. After that it decreases.

16. Jan 29, 2013

### CompuChip

So before the maximum $a_{n+1}/a_n > 1$ and after that $a_{n+1}/a_n < 1$. What happens in between?

17. Jan 29, 2013

### SammyS

Staff Emeritus
Well it is pretty easy to show that a999 = a1000 .

18. Jan 29, 2013

### Opus_723

But wait!

$\frac{1000^{999.5}}{999.5!}$

is larger than either of those.....

And now we go to scary places.

19. Jan 29, 2013

### Saitama

Equal to 1. Therefore n=999.

I plugged a_n in wolframalpha with n=999 and n=1000. The results are same but how can I show that?

As I do not have the exact question, it should be mentioned that n is an integer.

20. Jan 29, 2013

### Dick

n=999 gives 1000^999/999!. n=1000 gives 1000^1000/1000!. 1000!=999!*1000.