Totient Function and phi(n)=phi(2n) for odd n

Last year in number theory I discovered something with Euler's Totient Function that I couldn't explain. I asked my professor and he couldn't figure it out either. Here is what I discovered:

As a premise, it should be clear that phi(n)==phi(2n) where n is an odd, positive, integer. Using the formula for Euler's totient function, this is clear. However, looking at the numbers, it becomes more complex. For example, let n = 9. We know that phi(9)=phi(18)=6.

So we have the pos. integers from 1 to 9 ( n in red, coprime integers in blue, noncoprime integers in orange). Note that there are 4 primes in this range (2,3,5,7):

I'm having a hard time phrasing this, but I think what I mean to say is this: How can the phi function know to compensate for the number of prime numbers between n and 2n? Wouldn't this be related to the density of primes? Also, could this be used to prove that there exist infinite prime numbers?

I'm sorry If my wording is hard to understand. Once I gain some more understanding, I would like to write it up properly and show it to my math teacher or something.

Last year in number theory I discovered something with Euler's Totient Function that I couldn't explain. I asked my professor and he couldn't figure it out either. Here is what I discovered:

As a premise, it should be clear that phi(n)==phi(2n) where n is an odd, positive, integer. Using the formula for Euler's totient function, this is clear. However, looking at the numbers, it becomes more complex. For example, let n = 9. We know that phi(9)=phi(18)=6.

So we have the pos. integers from 1 to 9 ( n in red, coprime integers in blue, noncoprime integers in orange). Note that there are 4 primes in this range (2,3,5,7):

I'm having a hard time phrasing this, but I think what I mean to say is this: How can the phi function know to compensate for the number of prime numbers between n and 2n? Wouldn't this be related to the density of primes? Also, could this be used to prove that there exist infinite prime numbers?

I'm sorry If my wording is hard to understand. Once I gain some more understanding, I would like to write it up properly and show it to my math teacher or something.

Thanks in advance.

This is no more than a comment. It is not an answer. Hence best phrased as a question.

You ask "How can the phi function know to compensate for the number of prime numbers between n and 2n?" But, does the data indicate that it really does that as opposed to compensating for the number of co-prime numbers between n and 2n?

Nothing more than a (hopefully) seminal question, but, I really would like it if you could give me your best shot at an answer.

n=17 could be another interesting example. In the upper half of the coprimes to 34, you find not only new primes (19,23,29,31), but also powers of smaller primes (25,27) as well as other composite numbers (21,33).

Also, could this be used to prove that there exist infinite prime numbers?

QUOTE]

Not alone it can't. Phi(n) gives no information about the number of prime factors of the numbers less than and coprime to n, just the quantity of them.

Phi(n) does give an upper bound on the number of primes. (Its a truly awful upper bound though, as n goes to infinity Phi(n) goes to c*n for some constant, c, I can't remember. The number of primes less than n goes to n/ln(n), a MUCH smaller number for large n).

But you could say that phi(n) is related to the infinite product (1-1/p1)*(1-1/p2)*(1-1/p3)...over all primes. This product is equal to the sum 1/k for every positive integer k. Since that sum diverges there must be an infinite number of primes (Euler).

Also, could this be used to prove that there exist infinite prime numbers?

If there were finitely many primes, then phi(n) >= kn for some fixed positive k. If you know that there is an infinite sequence a_n with phi(a_n) < k a_n/log log a_n for some fixed positive k, then you could use this to show that there are infinitely many primes. But that's proving an easy result with a hard result.