Wikipedia:Reference desk/Archives/Mathematics/2008 June 24

= June 24 =

Divergent Series
Studying some analysis, I came across these two questions in my book. Give an example of a series that does not diverge to infinity but whose partial sums are increasing. One easy answer is just $$\sum_{n=0}^{\infty}\left(\frac{1}{2}\right)^n$$ which converges to 1.5. The second question, the converse of the first one, asks for a series which diverges to positive infinity but whose partial sums do not form an increasing sequence. What would such a series look like?76.79.202.34 (talk) 00:44, 24 June 2008 (UTC)
 * The first series you mention actually converges to 2 (see geometric series). You should be able to come up with the example you're looking for by using positive terms and negative terms (so that the partial sums are not an increasing sequence), but the positive terms need to be bigger than the negative ones.  Can you come up with one like that? 134.173.70.1 (talk) 00:56, 24 June 2008 (UTC)


 * (E/C) Your 1/2 sequence converges to 2, not 1.5, and is an example of Zeno's Paradox. -mattbuck (Talk) 00:58, 24 June 2008 (UTC)

Of course, I meant that the sum is two. Anyway, for the series in question, technically, my desired series can be something like 10-1+10-1+10-1+10... or some such series. The partial sums are both increasing and decreasing but the series does diverge. Is this good?76.79.202.34 (talk) 01:24, 24 June 2008 (UTC)
 * Yep, that does it. 134.173.70.1 (talk) 01:36, 24 June 2008 (UTC)
 * Well, the partial sums are neither increasing nor decreasing. You could also choose something much simpler, such as (7,1,2,3,4,5,6,7,8…) which clearly diverges to infinity, but is not increasing because from the first to the second partial sum it decreases. Now if you want something whose tail is not increasing nor decreasing, you need something slightly more interesting such as already given. GromXXVII (talk) 10:35, 24 June 2008 (UTC)
 * Huh? 7 + 1 > 7 last time I checked... If all the terms are positive, the partial sums will be strictly increasing. The OP's sequence is a good one. --Tango (talk) 15:01, 24 June 2008 (UTC)
 * Or did you mean those to be the partial sums? So the series is 7-6+1+1+1+1+1+...? --Tango (talk) 15:02, 24 June 2008 (UTC)

Interestingly enough, the harmonic series forms a decreasing sequence but diverges to infinity. shoy 14:47, 24 June 2008 (UTC)
 * In the harmonic series the terms are a decreasing sequence, but the sequence of partial sums is increasing. However, you can still have a summation where no tail of the sequence of partial sums is increasing (as Grom mentioned) and also make the terms of the series decay to 0.  One way is to interleave a positive harmonic series and a negative geometric series: 1 - 1 + 1/2 - 1/2 + 1/3 - 1/4 + 1/4 - 1/8 + 1/5 - 1/16 + ...  For bonus points, can you come up with one with the added restriction that the absolute values converge monotonically to 0?  (Hint: make sure it doesn't satisfy the alternating series test!) For some reason this brings to mind the Riemann rearrangement theorem, which is a cool result. 69.111.164.70 (talk) 17:47, 24 June 2008 (UTC)

As long as we are talking about the harmonic series, I recall reading something about eliminating integers that contain the digit 9 will keep the resulting series bounded. Is it true that if we eliminate all the integers that have a 9 in their decimal expansion will keep the sum of the reciprocals bounded? Is it true for other digits? What if we eliminate the digit one instead? Can this be proven? How will one find the bound or the limit of the series?76.79.202.34 (talk) 21:35, 24 June 2008 (UTC)
 * It's true, it doesn't matter which digit you use (or which number base), it can be proven, the limit is about 23. See Kempner series. Algebraist 22:06, 24 June 2008 (UTC)
 * That’s curious, any idea how many integers have a 9 in their decimal expansion relative to the total number? I’d want to sum 1/10 + 19/100 +280/1000 +... whose terms seem to be converging to 1 GromXXVII (talk) 23:17, 24 June 2008 (UTC)

Sure, that is pretty easy. It is just a basic counting problem. For example, let us define a function from the set of natural numbers to the set of natural numbers. This function, for a given n, returns the number of natural numbers between 1 and n (inclusive) that have the digit 9 in their decimal expansion. So, for example, f(1)=0=f(2)=...=f(8) but then f(9)=1=f(10)=f(11)=...=f(18). And then f(19)=2. The answer to your question would be f(n) compared with n. It is pretty easy, I think, to see a pattern as numbers get large. For example, f(100)=19 because you have ten numbers which have a 9 in their ones place (9,19,29,39,49,59,69,79,89,99) and then you have 10 more numbers with a 9 in their tens place (90,91,92,93,94,95,96,97,98,99) so the total is 20 but 99 has been counted twice so f(100)=19. Now we know that each group of a hundred has 19 such numbers. So f(100)=19, f(200)=38, f(300)=57, f(400)=76, f(500)=95, f(600)=114, f(700)=133, f(800)=152, f(899)=171, and for the next 100 numbers, they all will have the digit 9 so f(1000)=f(899)+100=271. Now we know that each batch of a thousand numbers will have 271 numbers with a 9 digit in them. Therefore f(2000)=542, f(3000)=813, and so on. For an added bonus, does this function have a fixed point? In other words, does there exist an n (might be very large) such that f(n)=n? A similar problem was on one of the Google employment exams.A Real Kaiser (talk) 23:41, 24 June 2008 (UTC)
 * I think to really answer Grom's question, you need to work out the limit of f(n)/n as n tends to infinity. My guess would be that it tends to 1, since if you consider longer and longer numbers there are more numbers to consider and a greater proportion of them contain a 9. That would mean that a randomly chosen integer will almost surely have a 9 in it. --Tango (talk) 00:46, 25 June 2008 (UTC)

Wow, you seem to be correct. Originally, after reading your post, I disagreed with you. I thought that the ratio f(n)/n might be quite small (less than a half) as n gets large. So, I wrote a mini MATLAB program and ran it. And guess what, your conjecture seems to be true. First we observe that for a natural number k, our f(n) satisfies the recursive relationship,

$$f(10^1)=1,\,f(10^{k+1})=9(f(10^k))+10^k$$.

This is exactly what we have above. So this way, we can quickly find out f(n) for large n. Let us also define g(n)=f(n)/n and now we have all the tools for a nice 10 liner code which can be run in MATLAB. MATLAB can only go up to k=308 but by the time $$n=10^{308}$$, our g(n) is indeed 0.9999999999999999. Now, after seeing this result, it is no wonder that the modified harmonic series converges. I mean you are eliminating almost all (pun intended) of the numbers. This would also mean that almost all the numbers have a digit 9 in their decimal expansion. But the same thing can be done for any digit like 1. So, after the same exact argument for each of the ten digits, can we say that almost all of the numbers contain all ten digits? So, from the harmonic series, if we eliminate all the terms with any one specific digit, it will converge. Awesome! We also know that the harmonic series with just the prime denominators also diverges. So, doing a proof by contradiction, we have that almost all of the prime numbers contain all 10 digits, because if they didn't, then we would have a harmonic series with denominators missing at least one digit which must converge which is a contradiction. Totally awesome!76.79.202.34 (talk) 01:53, 25 June 2008 (UTC)
 * I'm not sure your recursive relation is correct, it looks to me like you're counting some numbers twice. I suspect the 10k at the end should be 10k-f(10k), since you don't want to count numbers with a 9 in the first place and somewhere else twice. Or, equivalently, change the 9 to an 8, since you can add any digit that isn't a 0 or a 9 to the beginning of a number with a 9 to get another number with a 9, or you can add a 9 to the beginning of any number to get a number with a 9. The rest of your comment may well be correct, but I think it would need a lot of work to make it rigorous. --Tango (talk) 15:11, 25 June 2008 (UTC)

This relationship is correct because it gives us the same exact numbers as above. And the numbers above came from counting carefully so that something like 99 or 991 will not be counted twice. I mean you can easily verify this yourself. No need to take my word for it. As for the rest of the comment, of course, this is not rigorous in any manner and will take some effort to be written up nicely but it does seem a very cool idea.A Real Kaiser (talk) 01:11, 26 June 2008 (UTC)
 * You're right. After staring at it for a few minutes, I realise I was thinking about how many k-digit numbers have 9's in, rather than have many k-or-less-digit numbers do... Ignore me! --Tango (talk) 14:07, 26 June 2008 (UTC)

More on Diverging Series
Working with harmonic series, the next question I have is that

"Find a simple function of n in terms of ln(n), call it w(n) so that

$$\lim_{n\rightarrow\infty}\left(1+\frac{1}{3}+\frac{1}{5}+\cdots+\frac{1}{2n-1}-w(n)\right)=0$$."

Now, the book doesn't give any hints on how to go about this. In fact, I think that the author just wants the reader to guess and check. So, I took the easiest approach of graphing the partial sums of the odd terms and my w(n), and then see how their graphs coincide. I started with w(n)=ln(n) and ended with $$w(n)=0.5(\log(n)+1)+0.5$$. I have also calculated and graphed the partial sums and my w(n) up to n=50,000 and the graphs are virtually indistinguishable. In addition, for n=50,000, the maximum vertical difference (the L1 norm of the difference) between the two graphs is 0.0182 which is better than any other linear modification of log(n) I could dome up with. My questions is, with my given w(n), is the above limit really zero? How can one analytically come up with an expression so that the above limit is zero rather than just guessing and graphing to "eyeball" the two graphs getting closer and closer together?76.79.202.34 (talk) 21:49, 24 June 2008 (UTC)


 * Here's a hint: think of what happens when you take the series and subtract it from an appropriate partial sum of the harmonic series. Compare with the Euler-Mascheroni constant. Confusing Manifestation (Say hi!) 23:25, 24 June 2008 (UTC)


 * If I'm not mistaken, the Euler-Mascheroni constant is a part of the formula for w(n). Here's a big hint: find a way to make use of the harmonic series to approximate ln(n) for large n. By the way, the formula you came up with by trial and error is actually very close to correct answer. 76.224.119.217 (talk) 00:21, 25 June 2008 (UTC)

You are both, of course, right. The exact expression that I got is

$$w(n)=\frac{\ln(n)+\gamma}{2}+\ln(2)$$.

This is the correct one, right? Because I derived it analytically and then when I graphed it to check, the graphs are exactly the same for n=50,000. Thanks everyone!76.79.202.34 (talk) 02:44, 25 June 2008 (UTC)


 * That's correct. 76.224.119.217 (talk) 04:00, 25 June 2008 (UTC)