If a number is product of two primes, then given its totient function, we can know its prime factors, but how do we do this in generic case? If the number could have more than two prime factors can we still factorize the number given its totient function values?
2026-03-25 20:15:48.1774469748
Given $\varphi (n)$ and $n$ for large values, can we know prime factors of $n$
959 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in NUMBER-THEORY
- Maximum number of guaranteed coins to get in a "30 coins in 3 boxes" puzzle
- Interesting number theoretical game
- Show that $(x,y,z)$ is a primitive Pythagorean triple then either $x$ or $y$ is divisible by $3$.
- About polynomial value being perfect power.
- Name of Theorem for Coloring of $\{1, \dots, n\}$
- Reciprocal-totient function, in term of the totient function?
- What is the smallest integer $N>2$, such that $x^5+y^5 = N$ has a rational solution?
- Integer from base 10 to base 2
- How do I show that any natural number of this expression is a natural linear combination?
- Counting the number of solutions of the congruence $x^k\equiv h$ (mod q)
Related Questions in PRIME-FACTORIZATION
- For which natural numbers are $\phi(n)=2$?
- Fractions of the form $\frac{a}{k}\cdot\frac{b}{k}\cdot\frac{c}{k}\cdots=\frac{n}{k}$
- (Number of perfect powers ≤ n) ∼ $\sqrt{n}$?
- How do I solve complicated prime factorization problems? (Ex: 20711)
- Is there a pattern to addition of primesFactored numbers?
- Proof of Fundamental Theorem of Arithmetic: Uniqueness Part of Proof
- Find a prime factor of $7999973$ without a calculator
- Proof verification: Let $gcd(x,y)=1$. If $xy$ is a perfect square, then $x$ and $y$ are perfect squares.
- An idea for approaching Brocard's problem ($n!+1=m^2$)
- Looking for complex roots of unity which also happen to be complex primes
Related Questions in TOTIENT-FUNCTION
- Reciprocal-totient function, in term of the totient function?
- A congruence with the Euler's totient function and sum of divisors function
- Identify sequences from OEIS or the literature, or find examples of odd integers $n\geq 1$ satisfying these equations related to odd perfect numbers
- For which natural numbers are $\phi(n)=2$?
- A congruence with the Euler's totient function and number of divisors function
- Does converge $\sum_{n=2}^\infty\frac{1}{\varphi(p_n-2)-1+p_n}$, where $\varphi(n)$ is the Euler's totient function and $p_n$ the $n$th prime number?
- On the behaviour of $\frac{1}{N}\sum_{k=1}^N\frac{\pi(\varphi(k)+N)}{\varphi(\pi(k)+N)}$ as $N\to\infty$
- On the solutions of an equation involving the Euler's totient function that is solved by the primes of Rassias' conjecture
- Are there any known methods for finding Upper/Lower bounds on the number of Totients of x less than another number y?
- How is Carmichael's function subgroup of Euler's Totient function?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
This is essentially the same answer as the top one as @DavidG.Stork's link, but with some extra info.
Edit 2: Sagemath code example of the algorithm.
We may factor out even primes easily, so we assume $n$ is a product of odd primes. Then $\varphi(n)$ is divisible by $2$, so we may write $\varphi(n) = 2t$.
Pick a random integer $2<a<n$. If $\gcd(a,n)\neq 1$, then we have found a factor which reduces the problem (also see last part).
Assume instead that $\gcd(a,n)=1$. By Euler's Theorem, we know that $$ \begin{align} a^{2t} = a^{\varphi (n)} &\equiv 1 \pmod n\\ (a^t + 1)(a^t-1) &\equiv 0 \pmod n \end{align} $$ This means that the odd prime factors $p_i$ of $n$ each divide either $a^t+1$ or $a^t-1$. It cannot divide both, since $$ \gcd(a^t+1,a^t-1) = \gcd(2,a^t-1) $$ implies that $a^t+1$ and $a^t-1$ have a common factor of $2$ or none at all.
With high probability, either one of $$ \gcd(a^t+1 \pmod n,n),\quad \gcd(a^t-1 \pmod n,n) $$ will give a factor $1<d<n$, which reduces the problem. If this fails, we simply try another random $a$. This can only fail when $a^t+1\equiv 0\pmod n$ and $a^t-1\equiv 0\pmod n$, which I believe is at most $50\%$ chance (this is true for $n=pq$, not sure for multiple primes).
Edit 1: If $a^t-1\equiv 0 \pmod n$ and $t$ is even, we repeat the process: $$ (a^{t/2}+1)(a^{t/2}-1) \equiv 0 \pmod n $$ End_edit
The key here is for every $2$ tries, each of them easy to compute, we expect to get a random non-trivial factorization of $n$.
Whenever we find a prime factor $p$, we can divide out the maximum power $p^r$ from $n$ and $p^{r-1}(p-1)$ from $\varphi(n)$ and repeat the process. If the found factor $d$ is composite instead, write $n = dm$ and then repeat the process for $d$ and $m$ seperately using more random $a$'s: Since $$ (a^t+1)(a^t-1) \equiv 0 \pmod m $$ we can try $$ \gcd(a^t+1 \pmod m,m),\quad \gcd(a^t-1 \pmod m,m) $$