Jump to content

Talk:Euler's totient function/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 02:08, 4 February 2020 (Archiving 19 discussion(s) from Talk:Euler's totient function) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Archive 1

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? — Preceding unsigned comment added by Evilbu (talkcontribs) 19:04, 4 February 2006 (UTC)

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)

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)

Applications

What about applications of Euler's totient function? (Especially in CS)--User:Vanished user 8ij3r8jwefi 17:07, 16 May 2006 (UTC)

Phi Function

Can someone find phi(2695), phi(4312), and phi(5390)? They might all be the same. — Preceding unsigned comment added by 71.235.83.132 (talk) 21:15, 16 May 2006 (UTC)

They are indeed - all equal to 1680. And the significance is ... ? — Preceding unsigned comment added by Madmath789 (talkcontribs) 13:14, 19 May 2006 (UTC)

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)

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)

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. P.S. The URL has now been blacklisted so anyone wondering what we're talking about will have to look in the history. Anton Mravcek 23:03, 25 August 2007 (UTC)

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)

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)

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

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)

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)

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

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)

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)

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)

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)

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)

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

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)

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)

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)

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)

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)

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)

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)

Inequality

Can anyone show me how to prove

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

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

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)

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)

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

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)

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

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)

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

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)

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)

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. — Preceding unsigned comment added by Peawormsworth (talkcontribs) 09:01, 1 September 2012 (UTC)
On the topic of lower limits, saying there is no linear lower bound is false, y = 0 is never reached. That section needs clarification, unless I am misunderstanding somthing.134.129.203.28 (talk) 21:13, 24 April 2013 (UTC)
Of further note, the article on bounds says:

Every subset of the natural numbers has a lower bound, since the natural numbers have a least element (0, or 1 depending on the exact definition of natural numbers). An infinite subset of the natural numbers cannot be bounded from above. An infinite subset of the integers may be bounded from below or bounded from above, but not both. An infinite subset of the rational numbers may or may not be bounded from below and may or may not be bounded from above.

Which indicates I'm correct, but I'm uncomfortable changing this until someone who has already worked on the article verifies.134.129.203.28 (talk) —Preceding undated comment added 21:24, 24 April 2013 (UTC)
Sorry, no. The "linear lower bound" would be 0; there is no number ε > 0 such that φ(n) > ε n for all n > 1. — Arthur Rubin (talk) 22:29, 24 April 2013 (UTC)

There used to be a very nice set of bullet points about lower bounds in this article which I thought were quite helpful. Certainly it's necessary to give the "truthful" lower bound n/(loglogn + c) but it was really nice to have more practical bounds such as sqrt(n) < phi(n) for n>6 or n^(1/3) <phi(n) for n>2. Especially if coding something, it's easiest to start from a list which goes up to N^2 or N^3 before you get started with the actual work. Is there any particular reason these were removed?129.133.93.86 (talk) 15:16, 3 June 2013 (UTC)

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)

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)
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)
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)
Correct. Fredrik Johansson 18:47, 2 November 2006 (UTC)
No doubt: lowercase \phi. But indeed, especially on computers, I think the "straight" version (ϕ) is more frequent than the handwritten one, which in turn is preferred for angles (I think).— MFH:Talk 13:16, 3 June 2008 (UTC)
An italic html phi looks more like the tex angled one: φ. —David Eppstein (talk) 15:14, 16 June 2013 (UTC)