4

Is it possible to calculate $\phi(2^{1092}-1)$, where $\phi$ is the Euler Totient function? Or is completely infeasible even with the help of the most powerful machines?

the_candyman
  • 14,064
  • 4
  • 35
  • 62
  • Maybe I found the value with Pari: $19717935474162894189698325581227104323206020433944836210688842472128915736494652818215955571287162167735532258398556289708805360728480148318963160220681446238377244366214545455091667038424433438457207238906122389936307438986678763272793379538494189538026650123695920927258723837029483765082253887872190537678257735598080000000000$ –  Apr 02 '19 at 20:52
  • 1
    use difference of squares and difference of cubes to break your number into reasonable chunks that you can then factor. – qwr Apr 02 '19 at 20:54
  • Using the factors found by factordb as hinted to by Henning Makholm I confirm your value. I got 19717935474162894189698325581 227104323206020433944836210688842472128915736494652818215955 571287162167735532258398556289708805360728480148318963160220 681446238377244366214545455091667038424433438457207238906122 389936307438986678763272793379538494189538026650123695920927 258723837029483765082253887872190537678257735598080000000000 – Gottfried Helms Apr 03 '19 at 07:48

3 Answers3

4

Is it possible to calculate $\varphi(2^{1092}−1)$?

Yes it is, why shouldn't it be? In fact it is possible to calculate $\varphi(n)$ for arbitrary natural number. In fact, without any optimization, just asking Maple do the job, it took on my personal PC about $200$ seconds... Anyway you can help the program by knowing this form is special, so some divisors are obvious.

It's well known that if $d\mid n$ then $2^d-1 \mid 2^n-1$ (see for example Proof: If $n=ab$ then $2^a-1 \mid 2^n-1$), so checking all divisors of $1092$ this way get largest divisor $2^{546}-1 \mid 2^{1092}-1$. Same trick can be used repeatedly to $2^{546}-1$ and then the average machine can factorize these in an instant. So the only challenge remains to factorize $(2^{1092}-1)/(2^{546}-1)$, which has half the digits of the original number but still is a large number by itself. Well another trick is to calculate least common divisor of all the $2^d-1$ (efficiently by Euclid algorithm for example), and resulting number will also be a divisor. If we divide the original number by this, we get down to $87$ digit number (down from the $329$ digit number!). A this point it is probably best just to let the program compute the value, but for interest, here are some more interesting calculations (all of which are performed by usual factorization algorithms anyway).

Well small primes are always most likely to divide the number, so just iterating through small primes we get prime divisors $$503413,1948129$$ This is still a low hanging fruit, but dividing by this we lower the original number to a $75$ digits number $N$. Next I've tried Pollard's rho algorithm. By playing with starting values of the algorithm (and limiting running time), we can find few other factors. For example by letting $x=7,y=8$ we find a factor $467811806281$. At this point we've got to $63$ digit number. This is already feasible enough for modern machines, for example Maple on my machine find this number's factorization in about $10$ seconds, giving remaining prime divisors: $$275700717951546566946854497,3194753987813988499397428643895659569.$$ Now having complete prime factorization of $2^{1092}-1$ it is easy to calculate Totient function by using the fact that it is multiplicative.

Sil
  • 16,612
3

Well, it does test the boundaries of what Wolfram Alpha or even the Wolfram Open Cloud can do for you.

EulerPhi[2^1092 - 1]

... Cloud : This computation has exceeded the time limit for your plan.

$Aborted

However, Wolfram Alpha was able to give me a partial factorization that includes the prime $112901153$.

I looked up that number by itself in the OEIS and found an entry for primes $p$ such that at least one of $1093 p$ or $1093 p^2$ is a Poulet number. A comment helpfully says that these are the prime factors of $2^{1092} - 1$ that are congruent to $1$ modulo $364$.

So then you could try dividing the distinct composite factor given by Wolfram Alpha by the primes from the OEIS entry. I know, I know, it's a tedious and error-prone process, unless you have a Wolfram Alpha account that allows you to paste answers to your clipboard.

Once you have a complete factorization, obtaining $\phi(2^{1092} - 1)$ is a simple matter of multiplying the $(p - 1)^\alpha$.

P.S. There is at least one other OEIS entry you might find helpful.

Mr. Brooks
  • 1,098
2

You can find the prime factorization of $2^{1092}-1$ at http://factordb.com/index.php?query=2%5E1092-1

Then apply the usual formula for the totient.