Jump to content

Talk:Euler's totient function: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
SineBot (talk | contribs)
m Signing comment by Peawormsworth - "requesting an explanation for the slope equation of the lower limit."
please remove y=4n/15 from the diagram.
Line 226: Line 226:
== lower limit explained ==
== lower limit explained ==
I would like to know more about the lower limit of the co-primes. In the pictures it is shown as 4x/15, but there is no reference to this within the article. I am assuming that there is a reason for this based on the limit of some algorithm within this article. I assume there is such a proof or else, this function would not be labelled within the image. If anyone can explain this I would like to see it posted within the article. <small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Peawormsworth|Peawormsworth]] ([[User talk:Peawormsworth|talk]] • [[Special:Contributions/Peawormsworth|contribs]]) 08:51, 1 September 2012 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->
I would like to know more about the lower limit of the co-primes. In the pictures it is shown as 4x/15, but there is no reference to this within the article. I am assuming that there is a reason for this based on the limit of some algorithm within this article. I assume there is such a proof or else, this function would not be labelled within the image. If anyone can explain this I would like to see it posted within the article. <small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Peawormsworth|Peawormsworth]] ([[User talk:Peawormsworth|talk]] • [[Special:Contributions/Peawormsworth|contribs]]) 08:51, 1 September 2012 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->

:I found an answer to my own question: "Note that the lower bound of y = 4n/15 is not a real lower bound! It only occurs where n is a multiple of 30. There are many values below that line. (So this is not a lower bound for the whole totient function, but only for these first few values of n.)". This is a note attached to the image. If this is true, then I would suggest we completely remove this slope equation (y = 4n/15) from the image. Because it gives the reader a false impression that this is a true bound of the function. But it is not. If no one complains about this suggestion... I will go ahead and remove it from the image within the near future.

Revision as of 09:01, 1 September 2012

WikiProject iconMathematics B‑class High‑priority
WikiProject iconThis article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
BThis article has been rated as B-class on Wikipedia's content assessment scale.
HighThis article has been rated as High-priority on the project's priority scale.

The use of eight (8) for n (the argument to the totient function) in the opening paragraph might be misleading to some. All of it's coprimes are also prime. The use of nine (9) as the argument might be less misleading since it includes two composite numbers in it's set of coprimes. The number nine is also a power of a prime (just like eight) and thus allows simple computation of the totient. -Waylonflinn 22:38, 28 December 2006 (UTC)[reply]

How to pronounce totient?—Tokek 08:15, 23 Jun 2005 (UTC)

Totient rhymes with division's quotient. —optikos (talk) 03:48, 24 June 2008 (UTC)[reply]

I think it is "toe shent". BTW, I prefer "the cototient is defined as" because it is a definition, not something that happens to be true. Bubba73 15:22, 23 Jun 2005 (UTC)

Both "is defined as" and "is" are appropriate, however you actually typed "defined as is" instead of "is defined as" so it required fixing. The statement can be taken as a definition for cototient either way.—Tokek 17:24, 23 Jun 2005 (UTC)
That was a typo. "is defined as" makes it clear that it is a definition. If they're both appropriate, why not use the one that is more appropriate (is defined as)? I wrote that line originally without the "defined" part. Then I realized that it would improve the article to have "defined" in there, so I changed it, but I accidently stuck it in at the wrong place. Bubba73 18:01, 23 Jun 2005 (UTC)
Noted. —Tokek 19:06, 23 Jun 2005 (UTC)

Doesn't totient(n) always equal a positive integer? Railgun 16:59, 26 June 2006 (UTC)[reply]

What does the phrase "randomly large n" mean? Should that be "general n"? 62.8.160.190 05:17, 26 July 2006 (UTC)[reply]

less or equal

In the definition

The totient φ(n) of a positive integer n is defined to be the number of positive integers less than n and coprime to n.

Ncik changed less that into less or equal than

As n is not coprime to n, I fail to see the improvement of this change. Ncik, please explain. Bo Jacoby 14:52, 2 December 2005 (UTC)[reply]

It makes a difference for n=1. The original definition would make the value 0, the correction makes it 1. −Woodstone 21:09, 2 December 2005 (UTC)[reply]

Is 1 really coprime to 1 ? Yes, according to definition. Thank you. Bo Jacoby 12:41, 8 December 2005 (UTC)[reply]

Incorrect example or confusing definition

The first paragraph may be incorrect, for if you count the positive intergers less than or equal to 9 that don't have commmon factors with 9 besides 1, it will total 7, as it is in the example {1,2,4,5,7,8,9}. Only if it included the positive integers less than 9, it would be 6. —Preceding unsigned comment added by Flaviano Horozimbo Pires (talkcontribs) 18:13, 26 March 2010 (UTC)[reply]

You think 9 doesn't have any common factors with itself?? —David Eppstein (talk) 19:15, 26 March 2010 (UTC)[reply]

Thanks for taking that bullet Flaviano. I'm still confused, however. If k and n are relatively prime, then their greatest common divisor must be 1. But if this function "...counts the number of positive integers less than or equal to n...", then k could equal n. In that case, gcd(n, k) = n and n will often be something other than 1. Doesn't "or equal to" violate the restriction of being relatively prime? --Pbyhistorian (talk) 02:28, 9 August 2012 (UTC)[reply]

Nope. John Behind The Curve (talk) 02:33, 9 August 2012 (UTC)[reply]

In keeping with WP's spirit of elucidation, perhaps I can do a little better than that. Bo states above that n is not relatively prime with n, so the restriction "that are relatively prime to n" excludes n from the count when n > 1 and the addition of "or equal to" simply ensures that 1 is not excluded from the count by "less than...n" when n = 1 (per Woodstone above). --Pbyhistorian (talk) 19:40, 9 August 2012 (UTC)[reply]

lim sup

there are better ways than mine to write lim sup and lim inf with bars over and under the lim respectively

can anyone do that? (User:Evilbu 4 Feb 2006)

Don't know; however, I think "lim sup" is clearer and more commonly used than symbols with lines over them. Notation should allways be clear in WP, since there are many readers from diverse backgrounds. linas 04:56, 5 February 2006 (UTC)[reply]

other relations

a useful relation is that for n prime

I also believe the distance from a highly composite number to the nearest prime (or in effect the largest prime factor of the HCN) is expressible in terms of phi and tau. A crude first stab at it is Applies when the prime is not immed adjacent, thru 146th HCN --Billymac00 19:54, 15 May 2006 (UTC)[reply]

Applications

What about applications of Euler's totient function? (Especially in CS)--Čikić Dragan 17:07, 16 May 2006 (UTC)[reply]

Phi Function

Can someone find phi(2695), phi(4312), and phi(5390)? They might all be the same.

They are indeed - all equal to 1680. And the significance is ... ?

Different phis

Okay, what's up with the inconsistent usage of phi? The TeX version gives , while the HTML version gives φ. Should this article use the same phi style, or does it really matter? -Matt 17:23, 3 September 2006 (UTC)[reply]

The TeX version is an uppercase phi, Φ. The lowercase phi can also be generated, \varphi . There are HTML-versions for both uppercase and lowercase phis too, &Phi; Φ and &phi; φ. I don't know for sure but I think the uppercase phi is the "official" symbol used to denote the Euler's totient function and thus that should be used. Currently all articles I have seen referring to this article unfortunately use the lowercase phi. But of course it would be simple to convert them into uppercase phis if so is agreed. --ZeroOne (talk | @) 17:33, 2 November 2006 (UTC)[reply]
The TeX \phi is not an uppercase phi; \Phi is. Both \phi and \varphi denote a lowercase phi, just differently styled. Fredrik Johansson 17:40, 2 November 2006 (UTC)[reply]
Confusing. Uppercase TeX phi: . So you are saying that Euler's totient function should be denoted with a lowercase phi, then? --ZeroOne (talk | @) 18:37, 2 November 2006 (UTC)[reply]
Correct. Fredrik Johansson 18:47, 2 November 2006 (UTC)[reply]
No doubt: lowercase \phi. But indeed, especially on computers, I think the "straight" version (o+|) is more frequent than the handwritten one, which in turn is preferred for angles (I think).— MFH:Talk 13:16, 3 June 2008 (UTC)[reply]

value in 0

Are there references for discussions about phi(0)? I think it should not be defined, and I'm glad to see it is omitted from the table of values; in some computer algebra systems it gives an error ("*** eulerphi: zero argument in an arithmetic function." in PARI), but in others (Mathematica) it is defined to be 0. Obviously, it depends on which of the following definitions is used:

  • phi(n) = # U(Z/nZ)
  • phi(n) = # { k in N* | k <= n, gcd(k,n)=1 }

If the second is adapted, then phi(n)=0 for all n<1, while Mathematica inconsistently uses phi(-n)=phi(n), which only applies to the former definition (which in turn would give phi(0) = 2 = # {-1,1}).— MFH:Talk 13:16, 3 June 2008 (UTC)[reply]

To do

Article needs to say something about iterated totient function. Mentioned in article on perfect totient number. PrimeFan 00:35, 13 January 2007 (UTC)[reply]

less or equal

According to the logs, on 31 Jan 2007, Nberger changed "less than or equal" in the definition back to "less than". This subject came up in December 2005. I believe that "less than or equal" is correct. It makes a difference only for the value at 1, which should be 1 (as it is with "less than or equal") and not 0 (as it is with "less than").

P. N. Hilfinger 02:53, 22 February 2007 (UTC)[reply]

agree, "less than" is just incorrect. Farannan (talk) 02:53, 19 November 2007 (UTC)[reply]

Discrepancy in values

The first external reference leads to a Belgian website, which has a PDF file containing "1 000 premières valeurs de l'indicatrice d'Euler en pdf". I don't know for sure if this is intended to be the same function as the one described in this article, but for phi(36) it has 24, whereas in the article phi(36) is stated to be 12. If I've misunderstood, it's possible others will too. Also the other links on the Belgian webpage purport to be zip files of 100,1000,10000 values, but actually all point to the 100 values zip file. Windymilla 10:27, 25 August 2007 (UTC)[reply]

I'm confused about it, too. I tried putting in the first ten values into the OEIS and that gave me no results. I then tried the first ten values given here and OEISA000010 was the first result. The top of the Belgian PDF says "," which also has me confused. Anton Mravcek 23:03, 25 August 2007 (UTC) P.S. The URL has now been blacklisted so anyone wondering what we're talking about will have to look in the history.[reply]

Scriptstyle?

For some reason the phi symbol was written as , instead of , and was illegibly small. Script style is intended for sub/super-script size characters -- any idea why it was used? (Was there some formatting discussion that I missed?) I've reverted it. Nbarth 22:13, 18 October 2007 (UTC)[reply]

Clarity in derivation

I'm having trouble understanding this derivation:

Can someone explain in more detail what substitutions are happening? --CmaccompH89 (talk) 21:48, 7 December 2007 (UTC)[reply]

Sure. I recently had this problem myself. It's a very poorly explained derivation. Here's how it ought to go









McDutchy (talk) 00:07, 8 December 2007 (UTC)[reply]

Thanks!, that makes much more sense, I'll insert it into the article. --CmaccompH89 (talk) 00:16, 8 December 2007 (UTC)[reply]

I would appreciate someone more knowledgeable with LaTeX than I am cleaning it up a bit. It's a little sloppy. McDutchy (talk) 01:08, 8 December 2007 (UTC)[reply]

C++ Example

I doubt this is very optimized. Using the "gcd" function found here: http://en.wikipedia.org/wiki/Euclidean_algorithm#Using_recursion (converted to c++) And some of my own bad programming I made this:

   int gcd(int a, int b)
   {
       if (!b) return a;
       return gcd(b, a%b);     
   }
   
   int totient(int x)
   {
       int total=0;
       for(int i=0; i<x; i++)
       {
   		total = (gcd(x,i) > 1) ? total : total+1;
       }
   	return total;
   }

From what I've tested it works fine. (Sorry, I can't get the code boxes to work properly) —Preceding unsigned comment added by 85.211.66.110 (talk) 19:42, 28 January 2008 (UTC)[reply]

(Got them right for you) 77.193.184.147 (talk) 16:26, 10 February 2008 (UTC)[reply]

Here's a much faster function using prime factorisation. (If n's distinct prime factors are a, b and c then the totient is n(1-1/a)(1-1/b)(1-1/c).) Produces the same results as above, but with only around sqrt(n)/3 divisions in the worst case.

   int totient(int n)
   {
       if (n <= 1) return n == 1 ? 1 : 0;
       int phi = n;
       if (n % 2 == 0) { phi /= 2;       n /= 2; while (n % 2 == 0) n /= 2; }
       if (n % 3 == 0) { phi -= phi / 3; n /= 3; while (n % 3 == 0) n /= 3; }
       for (int p = 5; p * p <= n; )
       {
           if (n % p == 0) { phi -= phi / p; n /= p; while (n % p == 0) n /= p; }
           p += 2;
           if (p * p > n) break;
           if (n % p == 0) { phi -= phi / p; n /= p; while (n % p == 0) n /= p; }
           p += 4;
       }
       if (n > 1) phi -= phi / n;
       return phi;
   }

Defenestrator (talk) 07:54, 13 July 2010 (UTC)[reply]

Article title

Why is this article entitled Euler's totient function instead of totient function or just totient? Are there other totient functions than the one Euler defined? I have never heard of any other totients running around, but then again perhaps some obscure-to-me mathematician in some prior century defined a different totient function. If other totient functions exist other than Euler's either this article needs to have a section called "Other uses of totient" or those other Joebob's totient function and Snicklefritz's totient function need to appear in the "See also" section of this article. I find it odd that this article is named with a surname and other mathematical articles lack a genitive surname reference to their discoverer/designer, except where the common name refers to the person such as the Pythagorean theorem. —optikos (talk) 03:59, 24 June 2008 (UTC)[reply]

Indeed. There is a Jordan totient function[1][2] see Camille Jordan, indeed PlanetMath has a general definition of a Totient of which Euler's is just one. We may need a Totient (disambiguation).
p.s. this question arose for me when trying to workout the correct DEFAULTSORT for Proofs involving the totient function should it be {{DEFAULTSORT:Totient function, Proofs involving the}} or {{DEFAULTSORT:Euler's Totient function, Proofs involving the}}--Salix (talk): 20:20, 26 September 2008 (UTC)[reply]

Euler product

"This last formula is an Euler product and is often written as"

Is this right? The previous formula is expressed in terms of k, the supposedly equivalent formula following hasn't a k in it anywhere. How can they be equivalent? --jdege (talk) 14:40, 15 August 2008 (UTC)[reply]

Changed the formula to (hopefully) clarify this. If it goes away, you basically just multiply top-and-bottom by n, which cancels all the parts and leaves a term for each . Traviscj (talk) 01:41, 9 September 2010 (UTC)[reply]

W. Schramm

In the Computing section, the following formula is used:

Can someone explain the derivation of this formula? I don't understand how this works, as you have an imaginary part on the right side of the equation but not on the left. —Preceding unsigned comment added by Devnullnor (talkcontribs) 12:03, 7 March 2010 (UTC)[reply]

BTW, this is not what Schramm has shown, the attribution is wrong. It's an expansion of phi and was shown by the man himself (Euler). Schramm showed expansions of gcd(k,n), which is a different problem. — Preceding unsigned comment added by 71.206.142.54 (talk) 09:28, 13 June 2011 (UTC)[reply]

Inequality

Can anyone show me how to prove

for n>1? Thanks. Supermint (talk) 16:39, 27 March 2011 (UTC)[reply]
Hardy & Wright, Thm. 329. See http://en.wikipedia.org/wiki/Arithmetic_functions#Miscellaneous

Virginia-American (talk) 13:52, 7 December 2011 (UTC)[reply]

phi(1000) on the plot

Euler's phi(1000) = 400 does not appear on the plot of the first 1000 values of phi. 72.83.89.94 (talk) 15:47, 25 June 2011 (UTC)[reply]

Yes, but I think that hardly makes any difference. If you'd like to correct it, register and you'll be able to upload a new version of the plot. Or tell the user who originally made the picture (it:User:Toobaz) about this mistake. -- X7q (talk) 20:39, 25 June 2011 (UTC)[reply]

lower limit explained

I would like to know more about the lower limit of the co-primes. In the pictures it is shown as 4x/15, but there is no reference to this within the article. I am assuming that there is a reason for this based on the limit of some algorithm within this article. I assume there is such a proof or else, this function would not be labelled within the image. If anyone can explain this I would like to see it posted within the article. — Preceding unsigned comment added by Peawormsworth (talkcontribs) 08:51, 1 September 2012 (UTC)[reply]

I found an answer to my own question: "Note that the lower bound of y = 4n/15 is not a real lower bound! It only occurs where n is a multiple of 30. There are many values below that line. (So this is not a lower bound for the whole totient function, but only for these first few values of n.)". This is a note attached to the image. If this is true, then I would suggest we completely remove this slope equation (y = 4n/15) from the image. Because it gives the reader a false impression that this is a true bound of the function. But it is not. If no one complains about this suggestion... I will go ahead and remove it from the image within the near future.