G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
4 hours ago
Spring is in full swing and summer is right around the corner, what are your plans? At AoPS Online our schedule has new classes starting now through July, so be sure to keep your skills sharp and be prepared for the Fall school year! Check out the schedule of upcoming classes below.

WOOT early bird pricing is in effect, don’t miss out! If you took MathWOOT Level 2 last year, no worries, it is all new problems this year! Our Worldwide Online Olympiad Training program is for high school level competitors. AoPS designed these courses to help our top students get the deep focus they need to succeed in their specific competition goals. Check out the details at this link for all our WOOT programs in math, computer science, chemistry, and physics.

Looking for summer camps in math and language arts? Be sure to check out the video-based summer camps offered at the Virtual Campus that are 2- to 4-weeks in duration. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following events:
[list][*]April 3rd (Webinar), 4pm PT/7:00pm ET, Learning with AoPS: Perspectives from a Parent, Math Camp Instructor, and University Professor
[*]April 8th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS State Discussion
April 9th (Webinar), 4:00pm PT/7:00pm ET, Learn about Video-based Summer Camps at the Virtual Campus
[*]April 10th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MathILy and MathILy-Er Math Jam: Multibackwards Numbers[/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Sunday, Apr 13 - Aug 10
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Sunday, Apr 13 - Aug 10
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Monday, Apr 7 - Jul 28
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Wednesday, Apr 16 - Jul 2
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Thursday, Apr 17 - Jul 3
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Wednesday, Apr 23 - Oct 1
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Intermediate: Grades 8-12

Intermediate Algebra
Monday, Apr 21 - Oct 13
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Wednesday, Apr 16 - Jul 2
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Friday, Apr 11 - Jun 27
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
4 hours ago
0 replies
k a My Retirement & New Leadership at AoPS
rrusczyk   1571
N Mar 26, 2025 by SmartGroot
I write today to announce my retirement as CEO from Art of Problem Solving. When I founded AoPS 22 years ago, I never imagined that we would reach so many students and families, or that we would find so many channels through which we discover, inspire, and train the great problem solvers of the next generation. I am very proud of all we have accomplished and I’m thankful for the many supporters who provided inspiration and encouragement along the way. I'm particularly grateful to all of the wonderful members of the AoPS Community!

I’m delighted to introduce our new leaders - Ben Kornell and Andrew Sutherland. Ben has extensive experience in education and edtech prior to joining AoPS as my successor as CEO, including starting like I did as a classroom teacher. He has a deep understanding of the value of our work because he’s an AoPS parent! Meanwhile, Andrew and I have common roots as founders of education companies; he launched Quizlet at age 15! His journey from founder to MIT to technology and product leader as our Chief Product Officer traces a pathway many of our students will follow in the years to come.

Thank you again for your support for Art of Problem Solving and we look forward to working with millions more wonderful problem solvers in the years to come.

And special thanks to all of the amazing AoPS team members who have helped build AoPS. We’ve come a long way from here:IMAGE
1571 replies
rrusczyk
Mar 24, 2025
SmartGroot
Mar 26, 2025
Unlimited candy in PAGMO
JuanDelPan   21
N 9 minutes ago by akliu
Source: Pan-American Girls' Mathematical Olympiad 2021, P5
Celeste has an unlimited amount of each type of $n$ types of candy, numerated type 1, type 2, ... type n. Initially she takes $m>0$ candy pieces and places them in a row on a table. Then, she chooses one of the following operations (if available) and executes it:

$1.$ She eats a candy of type $k$, and in its position in the row she places one candy type $k-1$ followed by one candy type $k+1$ (we consider type $n+1$ to be type 1, and type 0 to be type $n$).

$2.$ She chooses two consecutive candies which are the same type, and eats them.

Find all positive integers $n$ for which Celeste can leave the table empty for any value of $m$ and any configuration of candies on the table.

$\textit{Proposed by Federico Bach and Santiago Rodriguez, Colombia}$
21 replies
JuanDelPan
Oct 6, 2021
akliu
9 minutes ago
set with c+2a>3b
VicKmath7   48
N 25 minutes ago by akliu
Source: ISL 2021 A1
Let $n$ be a positive integer. Given is a subset $A$ of $\{0,1,...,5^n\}$ with $4n+2$ elements. Prove that there exist three elements $a<b<c$ from $A$ such that $c+2a>3b$.

Proposed by Dominik Burek and Tomasz Ciesla, Poland
48 replies
VicKmath7
Jul 12, 2022
akliu
25 minutes ago
A property of divisors
rightways   10
N an hour ago by akliu
Source: Kazakhstan NMO 2016, P1
Prove that one can arrange all positive divisors of any given positive integer around a circle so that for any two neighboring numbers one is divisible by another.
10 replies
rightways
Mar 17, 2016
akliu
an hour ago
Famous geo configuration appears on the district MO
AndreiVila   3
N an hour ago by chirita.andrei
Source: Romanian District Olympiad 2025 10.4
Let $ABCDEF$ be a convex hexagon with $\angle A = \angle C=\angle E$ and $\angle B = \angle D=\angle F$.
[list=a]
[*] Prove that there is a unique point $P$ which is equidistant from sides $AB,CD$ and $EF$.
[*] If $G_1$ and $G_2$ are the centers of mass of $\triangle ACE$ and $\triangle BDF$, show that $\angle G_1PG_2=60^{\circ}$.
3 replies
AndreiVila
Mar 8, 2025
chirita.andrei
an hour ago
No more topics!
Repeated Euler phi applications
v_Enhance   26
N Mar 31, 2025 by Zany9998
Source: USA TSTST 2016 Problem 4, by Linus Hamilton
Suppose that $n$ and $k$ are positive integers such that \[ 1 = \underbrace{\varphi( \varphi( \dots \varphi(}_{k\ \text{times}} n) \dots )). \]Prove that $n \le 3^k$.

Here $\varphi(n)$ denotes Euler's totient function, i.e. $\varphi(n)$ denotes the number of elements of $\{1, \dots, n\}$ which are relatively prime to $n$. In particular, $\varphi(1) = 1$.

Proposed by Linus Hamilton
26 replies
v_Enhance
Jun 29, 2016
Zany9998
Mar 31, 2025
Repeated Euler phi applications
G H J
Source: USA TSTST 2016 Problem 4, by Linus Hamilton
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6870 posts
#1 • 11 Y
Y by mssmath, kk108, tenplusten, rashah76, v4913, megarnie, HamstPan38825, GorgonMathDota, Adventure10, Mango247, MS_asdfgzxcvb
Suppose that $n$ and $k$ are positive integers such that \[ 1 = \underbrace{\varphi( \varphi( \dots \varphi(}_{k\ \text{times}} n) \dots )). \]Prove that $n \le 3^k$.

Here $\varphi(n)$ denotes Euler's totient function, i.e. $\varphi(n)$ denotes the number of elements of $\{1, \dots, n\}$ which are relatively prime to $n$. In particular, $\varphi(1) = 1$.

Proposed by Linus Hamilton
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mssmath
977 posts
#2 • 4 Y
Y by sualehasif996, pi271828, Adventure10, Mango247
#waitingforv_Enhance
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6870 posts
#3 • 9 Y
Y by mssmath, EulersTurban, yayitsme, Limerent, v4913, HamstPan38825, Adventure10, Mango247, NicoN9
Sorry, was check TSTST scores for transcription errors :P

The main observation is that the exponent of $2$ decreases by at most $1$ with each application of $\varphi$. This will give us the desired estimate.

Define the \emph{weight} function $w$ on positive integers as follows: it satisfies $w(ab) = w(a) + w(b)$, $w(2) = 1$, and $w(p) = w(p-1)$ for any prime $p$. By induction, we see that $w(n)$ counts the powers of $2$ that are produced as $\varphi$ is repeatedly applied to $n$. In particular, $k \ge w(n)$.

So, it suffices to prove that $w(p) \ge \log_3 p$ for every $p$. This is certainly true for $p = 2$. For any other $p$, we use strong induction and note that \[ w(p) = w(2) + w\left( \frac{p-1}{2} \right) \ge 1 + \log_3(p-1) - \log_3 2 \ge \log_3 p \]for any $p > 2$. This solves the problem.
This post has been edited 1 time. Last edited by v_Enhance, Jul 3, 2016, 2:19 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pi37
2079 posts
#4 • 2 Y
Y by Adventure10, Mango247
I had a solution which I believe was somewhat different than the other approaches, which is outlined as follows. Define a function $\kappa(n)$ to be multiplicative satisfying $\kappa(p^n)=\phi(p^n)$ for $p\le 3$ and $\kappa(p^n)=p^{n-1}(p-1)\cdot \frac{3}{2}$ for $p\ge 5$. We also define the relation $x \text{ R }y$.to be true if:
  1. $v_2(x)+v_3(x)\ge v_2(y)+v_3(y)$
  2. $v_3(x)\le v_3(y)$
  3. $v_p(x)=v_p(y)$ for $p\ge 5$.
We claim that if $x\text{ R }2y$, then $\phi(x)\text{ R } \kappa(2y)$. Using this, we show that if $\phi^{r}(2n)=1$, then $\kappa^{r}(2n)=1$. But $\kappa(n)\ge \frac{1}{3} n$, which easily implies the result.
This post has been edited 2 times. Last edited by pi37, Jul 3, 2016, 6:23 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mssmath
977 posts
#5 • 2 Y
Y by Adventure10, Mango247
I must be in delirium.
This post has been edited 2 times. Last edited by mssmath, Jul 1, 2016, 1:24 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
angiland
364 posts
#6 • 1 Y
Y by Adventure10
There must be something wrong here, cuz $n = 2 \cdot 3^{k-1}$ solves the equation.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
yunxiu
571 posts
#7 • 4 Y
Y by v_Enhance, yzhiyu, Adventure10, Mango247
v_Enhance wrote:
Sorry, was check TSTST scores for transcription errors :P

Define the \emph{weight} function $w$ on positive integers as follows: it is completely multiplicative, satisfies $w(2) = 1$, and $w(p) = w(p-1)$ for any prime $p$. By induction, we see that $w(n)$ counts the powers of $2$ that are produced as $\varphi$ is repeatedly applied to $n$. In particular, $k \ge w(n)$.

"it is completely multiplicative" Maybe "it is Logarithmic".
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6870 posts
#8 • 3 Y
Y by v4913, HamstPan38825, Adventure10
You're correct, of course. Thanks! I'll fix that in the official solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Pure_IQ
426 posts
#9 • 2 Y
Y by Adventure10, Mango247
angiland wrote:
There must be something wrong here, cuz $n = 2 \cdot 3^{k-1}$ solves the equation.
$n=2\cdot 3^{k-1}$ < $ 3^{k}$ . :)
This post has been edited 3 times. Last edited by Pure_IQ, Jul 3, 2016, 9:16 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
angiland
364 posts
#10 • 3 Y
Y by AlastorMoody, Adventure10, Mango247
Of course. I wrote that in response to mssmath' attempt of showing $n \leq (\frac{7}{3})^k$, but he/she has deleted the original post
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Aiscrim
409 posts
#13 • 13 Y
Y by mssmath, djmathman, yzhiyu, SidVicious, Leooooo, NJOY, rashah76, Frestho, mijail, Aryan-23, pavel kozlov, Pratik12, Adventure10
My solution during the actual TSTST is a somewhat refined version of the ones already posted and provides the best possible bound on $n$.

Let $\varphi^k(n)=\underbrace{\varphi( \varphi( \dots \varphi(}_{k\ \text{times}} n) \dots ))$. Define $f:\mathbb{N}/ \{1\}\rightarrow \mathbb{N}$ so that $f(n)$ is the number of iterations of the Euler function required to obtain $2$ starting from $n$ (it is obvious that this number exists and is unique as $\varphi (k)$ is even and $\varphi(k)<k$ for $k\ge 3$). So $\varphi^{f(n)}(n)=2$. Take $f(2)=0$.

Lemma: If $n$ is even, $n=2^kp_1^{\alpha_1}...p_t^{\alpha_t}$, we have $f(n)=k-1+\alpha_1f(p_1)+...+\alpha_tf(p_t)$. If $n$ is odd, $n=p_1^{\alpha_1}...p_t^{\alpha_t}$, we have $f(n)=\alpha_1f(p_1)+...+\alpha_tf(p_t)$
Remark: This implies $f(ab)=f(a)+f(b)$ if at least one of $a$ and $b$ is odd and $f(ab)=f(a)+f(b)+1$ otherwise.
Proof.

Lemma: If $n$ is even, $n\le 2\cdot 3^{f(n)}$. If $n$ is odd, $n\le 3^{f(n)}$.
Proof.

Returning to the original problem, $\varphi^k(n)=1$ implies $f(n)\le k-1$. By the previous lemma, if $n$ is odd, $n\le 3^{k-1}$ and if $n$ is even, $n\le 2\cdot 3^{k-1}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
william122
1576 posts
#15 • 3 Y
Y by AmirKhusrau, Adventure10, Mango247
Note that, with each application on totient, the power of 2 can be decreased by at most 1. So, it makes sense to investigate how many powers of 2 individual numbers can make.

For example, take $7$. $\phi(7)=6=2*3$, so it makes 1 $2$. After another application, $\phi(3)=2$, which creates another 2. In total, $7$ will create two $2$s after iteratively taking its phi. Let the amount of 2s a number can make be $f(k)$. It is not hard to see that $f(ab)=f(a)+f(b)$, since we can treat the two components separately. Furthermore, the amount of totients necessary to turn a number into 1 is at least $f$, so it remains to show that $f(x)\ge \log_3 x$. This follows from induction, as $f(ab)=f(a)+f(b)\ge \log_3(ab)$ if $x$ is composite. And, if $x$ is a prime more than 2, $f(x)=f(x-1)\ge \log_3(x-1)$. $2|x-1$, so the RHS is noninteger, so $f(x)\ge \lceil\log_3(x-1)\rceil\ge \log_3 x$, as desired.
This post has been edited 1 time. Last edited by william122, Mar 26, 2019, 9:24 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AlastorMoody
2125 posts
#16 • 4 Y
Y by a_simple_guy, gamerrk1004, SenatorPauline, kamatadu
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathlogician
1051 posts
#17
Y by
Great problem that explores the depth of the totient function.

Note that the exponent of $2$ in the prime factorization of $n$ decreases by at most one with each application of $\varphi$. Therefore, it suffices to show that the number of $2$s generated by repeating applying $\varphi$ is at least $\log_3n$.

To this end, define a function $f$ that performs the same function as $\varphi$, except it does not decrease the exponent of $2$ in $n$. (For example, $f(2^2 \cdot 5^6) = 4/5  \cdot 2^2 \cdot 5^6$ ). Now it is easy to observe that $f$ is also multiplicative, so we may use strong induction. Note that as all $p \geq 3$ is odd, we find that $$f(p) = f(2) + f \left(\frac{p-1}{2} \right) \geq 1 +\log_3(p-1) - log_3(2) \geq log_3 (p),$$as desired.
This post has been edited 2 times. Last edited by mathlogician, Oct 19, 2020, 2:34 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HrishiP
1346 posts
#18 • 3 Y
Y by Mango247, Mango247, Mango247
redacted
This post has been edited 1 time. Last edited by HrishiP, Jun 29, 2022, 5:21 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MatBoy-123
396 posts
#19
Y by
I tried $ n= 2^a $ , then $ n=3^b $ then $ n =2^a 3^b $ , $ n=2^a 3^b 5^c $ and then I reached to make a perfect claim...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pad
1671 posts
#20 • 1 Y
Y by pavel kozlov
Let $f(n)$ be the minimum number of times $\varphi$ must be applied to $n$ to reach 1. For example, $f(2)=1$.

The main claim is that we can rigidly classify $f(n)$ completely in terms of $f(\text{primes})$.
Key Claim: Consider the prime factorization $n=p_1^{e_1}\cdots p_k^{e_k}$ where $p_1<\cdots<p_k$. For $n\ge 2$, \[ f(n)=\begin{cases}1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i &\text{ if } 2\nmid n\\ e_1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i &\text{ if $2\mid n$, i.e. $p_1=2$}.  \end{cases} \]In particular, $f(n)$ is either a linear combination of the $e_i$'s or one plus a linear combination.

For example, compute manually $f(3)=2$, $f(13)=4$, and $f(37)=5$, so the claim contends that $f(3^a13^b37^c) = 1+a+3b+4c$ and $f(2^a13^b)=a+3b$.
Proof: Strong induct on $n$, base cases of $n$ prime trivial. Assume that the claim holds for $1,\ldots,n-1$. For any $a,b$ with $ab \le n-1$, we can confirm from the induction hypothesis that \[f(ab)=\begin{cases}f(a) + f(b) &\text{ if } 2\mid a \text{ and } 2\mid b, \\ -1+f(a)+f(b) &\text{ if } 2\nmid a \text{ or } 2\nmid b. \end{cases} \qquad (\spadesuit)\]We have $f(n) = 1+f(\varphi(n)$ by definition. Also, in particular, $f(p)=1+f(p-1)$, so $f(p-1)=f(p)-1$ for primes $p$.
  • Case 1: $2\nmid n$. Since $\varphi(n)<n$, we can use $(\spadesuit)$: \begin{align*}         f(n) &= 1+f(\varphi(n)) \\             &= 1+f\big( (p_1-1)\cdots (p_k-1) p_1^{e_1-1}\cdots p_k^{e_k-1} \big) \\             &= 1+\left[ -1+ f(p_1-1) + \cdots + f(p_k-1) + f\big(p_1^{e_1-1}\cdots p_k^{e_k-1} \big)\right] \\             &= [f(p_1)-1] +\cdots + [f(p_k)-1] + \left[ 1 + \sum_{i=1}^k \big( f(p_i)-1\big)(e_i-1) \right] \\             &= 1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i.     \end{align*}We can also confirm that even if $e_1=1$, the claimed induction still holds.
  • Case 2: $2\mid n$. Then $p_1=2$. Since $\varphi(n)<n$, we can use $(\spadesuit)$: \begin{align*}         f(n) &= 1+f(\varphi(n)) \\         &= 1+f\big( (p_1-1)\cdots (p_k-1) p_1^{e_1-1}\cdots p_k^{e_k-1} \big) \\         &= 1+\left[ f(p_1-1) + \cdots + f(p_k-1) + f\big(p_1^{e_1-1}\cdots p_k^{e_k-1} \big)\right] \\         &= 1+ [f(p_1)-1] +\cdots + [f(p_k)-1] + \left[ (e_1-1) + \sum_{i=1}^k \big( f(p_i)-1\big)(e_i-1) \right] \\         &= e_1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i.     \end{align*}
This finishes the induction, and proves the claim. $\blacksquare$
We claim that $f(n) \le \log_3(n)$. Since the claim holds for all $n$, we have that $(\spadesuit)$ holds for all $a$ and $b$. In particular, $f(ab) \le f(a)+f(b)$. Hence it suffices to show $f(p) \le \log_3(p)$ for primes $p$. Induct. The prime factors of $\tfrac{p-1}{2}$ are all less than $p$, so \begin{align*}     f(p) &= f(p-1) + 1 \\     &= \left[-1+f(2^{\nu_2(p-1)}) + f\left(\frac{p-1}{2^{\nu_2(p-1)}}\right)\right]+1 \\     &\le \log_3(2^{\nu_2(p-1)}) + \log_3\left(\frac{p-1}{2^{\nu_2(p-1)}}\right) \\     &= \log_3(p-1) \\     &<\log_3(p), \end{align*}and we are done. Note that we had to use $(\spadesuit)$ above beyond just the weaker $f(ab)\le f(a)+f(b)$ inequality.


Remarks
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peatlo17
77 posts
#21
Y by
Motivation

We actually prove the better bound $n \le 2\cdot 3^{k-1}$.

Claim: For a given $k$, the upper bound of $n$ is not odd.
Proof. Consider a maximal odd natural number $n$ where $\varphi^k(n) = 1$. Then $\varphi^k(2n) = 1$, contradiction to maximality.

This implies that we can consider even $n$ only.

Note that for even $n$, each application of the $\varphi$ function gets rid of exactly one of the 2's in the prime factorization of $n$, while odd primes contribute smaller odd primes or more 2's to the prime factorization. This implies that, for even $n$, the minimum number of iterations must be equal to the total amount of 2's produced by all of the primes over the course of the function's application.

Let $f(n)$ be the total number of 2's produced by a number $n$ after repeated applications of the $\varphi$ function. Clearly, we have that $f(ab) = f(a)+f(b)$, with $f(p)=f(p-1)$ for prime $p$ and $f(2) = 1$. Note that for even $n$, the minimum number of iterations we need to apply is exactly $f(n)$.

Claim: $f(n) \ge \log_3(n)$ for $n \ge 2$
Proof: We proceed by strong induction on $n$. Note that we only need to prove the result for primes $p$, then the result for composite numbers is immediate. We have the base cases $f(3) = f(2) = 1$. Then, for prime $p$,
$$f(p) = f(p-1) = f\left(\frac{p-1}{2}\right) + f(2) = f\left(\frac{p-1}{2}\right) + f(3) \ge \log_3\left(\frac{p-1}{2}\right) + \log_3(3) = \log_3\left(\frac{3(p-1)}{2}\right) \ge \log_3(p)$$
Now, for maximal even $n$, with $\varphi^k(n)=1$, note that $f(n) = k$. Thus we have that
\begin{align*}
f(n) &\ge \log_3(n)\\
k &\ge \log_3(n)\\
k-1 &\ge \log_3(\tfrac{n}{2})\\
3^{k-1} &\ge \tfrac{n}{2}\\
\Aboxed{2\cdot 3^{k-1} &\ge n}
\end{align*}as desired.

Remark
This post has been edited 1 time. Last edited by peatlo17, Apr 15, 2021, 6:37 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
jj_ca888
2726 posts
#22 • 1 Y
Y by MS_asdfgzxcvb
Note that the $\phi(x)$ function decreases $v_2(x)$ by at most $1$, and only when $x$ is a power of $2$. Define $f(x)$ to be the maximal possible $v_2$ value upon repeatedly applying $\phi$ to $x$. It follows that $k \geq f(x)$, equality achieved when $x$ is a power of $2$. Now we shall prove a lower bound of $f(x)$ is $\log_3(x)$.

We strong induct on $x$, based on the largest prime dividing $x$. The base cases of $x = 1$ and $x = 2^k$ are trivial, and for the inductive step, if the result holds for all $x$ for which only primes $p_i < p$ divide it, then for any $n$ with largest prime $p$ dividing it, note\[f(n) = f(p^m) + f(n/p^m) \geq mf(p-1) + \log_3(n/p^m) \geq \log_3(n)\]where $m = v_p(n)$, finishing the induction as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Afo
1002 posts
#23
Y by
My solution is similar to pad's solution (#20), except that I proved the best bound: $n \leq 2 \cdot 3^{k-1}$. So I'll copy it since there's no point in writing it again.
Solution.
pad wrote:
Let $f(n)$ be the minimum number of times $\varphi$ must be applied to $n$ to reach 1. For example, $f(2)=1$.

The main claim is that we can rigidly classify $f(n)$ completely in terms of $f(\text{primes})$.
Key Claim: Consider the prime factorization $n=p_1^{e_1}\cdots p_k^{e_k}$ where $p_1<\cdots<p_k$. For $n\ge 2$, \[ f(n)=\begin{cases}1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i &\text{ if } 2\nmid n\\ e_1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i &\text{ if $2\mid n$, i.e. $p_1=2$}.  \end{cases} \]In particular, $f(n)$ is either a linear combination of the $e_i$'s or one plus a linear combination.

For example, compute manually $f(3)=2$, $f(13)=4$, and $f(37)=5$, so the claim contends that $f(3^a13^b37^c) = 1+a+3b+4c$ and $f(2^a13^b)=a+3b$.
Proof: Strong induct on $n$, base cases of $n$ prime trivial. Assume that the claim holds for $1,\ldots,n-1$. For any $a,b$ with $ab \le n-1$, we can confirm from the induction hypothesis that \[f(ab)=\begin{cases}f(a) + f(b) &\text{ if } 2\mid a \text{ and } 2\mid b, \\ -1+f(a)+f(b) &\text{ if } 2\nmid a \text{ or } 2\nmid b. \end{cases} \qquad (\spadesuit)\]We have $f(n) = 1+f(\varphi(n)$ by definition. Also, in particular, $f(p)=1+f(p-1)$, so $f(p-1)=f(p)-1$ for primes $p$.
  • Case 1: $2\nmid n$. Since $\varphi(n)<n$, we can use $(\spadesuit)$: \begin{align*}         f(n) &= 1+f(\varphi(n)) \\             &= 1+f\big( (p_1-1)\cdots (p_k-1) p_1^{e_1-1}\cdots p_k^{e_k-1} \big) \\             &= 1+\left[ -1+ f(p_1-1) + \cdots + f(p_k-1) + f\big(p_1^{e_1-1}\cdots p_k^{e_k-1} \big)\right] \\             &= [f(p_1)-1] +\cdots + [f(p_k)-1] + \left[ 1 + \sum_{i=1}^k \big( f(p_i)-1\big)(e_i-1) \right] \\             &= 1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i.     \end{align*}We can also confirm that even if $e_1=1$, the claimed induction still holds.
  • Case 2: $2\mid n$. Then $p_1=2$. Since $\varphi(n)<n$, we can use $(\spadesuit)$: \begin{align*}         f(n) &= 1+f(\varphi(n)) \\         &= 1+f\big( (p_1-1)\cdots (p_k-1) p_1^{e_1-1}\cdots p_k^{e_k-1} \big) \\         &= 1+\left[ f(p_1-1) + \cdots + f(p_k-1) + f\big(p_1^{e_1-1}\cdots p_k^{e_k-1} \big)\right] \\         &= 1+ [f(p_1)-1] +\cdots + [f(p_k)-1] + \left[ (e_1-1) + \sum_{i=1}^k \big( f(p_i)-1\big)(e_i-1) \right] \\         &= e_1 + \sum_{i=1}^k \big(f(p_i)-1\big)e_i.     \end{align*}
This finishes the induction, and proves the claim. $\blacksquare$

Note that $n \leq 2 \cdot 3^{k-1} \iff f(n)\ge \log_3 \frac{3n}{2}$.

Case 1. $n = 2^2 p_1^{a_1}\dots p_m^{a_m}$.
Note that $f(n) = f(2\cdot 2 p_1^{a_1}\dots p_m^{a_m}) = f(2) + f(2 p_1^{a_1}\dots p_m^{a_m}) = 1 + f(2 p_1^{a_1}\dots p_m^{a_m}) \ge \log_3 3 \cdot$$ \frac{3}{2} (2 p_1^{a_1}\dots  p_m^{a_m}) = \log_3 \frac{9n}{4}$
$ \ge \log_3 \frac{3n}{2}$

Case 2. $n = 2p_1^{a_1}p_2^{a_2}\dots p_m^{a_m}$ where $4 \nmid n$ and all exponents are positive.
Then,
$$f(n)=f(2)+f(\frac{n}{2}) -1 = f(\frac{n}{2}) = f(p_1^{a_1}\dots p_m^{a_m})$$So $f(n) = 1 + f( \left(p_1^{a_1-1}(p_1-1)\right)\dots  \left(p_m^{a_m-1}(p_m-1)\right) \ge \log_3 3 \left(\frac{3}{2}\right)^m  \left(p_1^{a_1-1}(p_1-1)\right)\dots  \left(p_m^{a_m-1}(p_m-1)\right)\ge \log_3 \frac{3n}{2} \iff$
$$\left(\frac{3}{2}\right)^m (p_1-1)\dots (p_m-1) \ge p_1 p_2 \dots p_m$$The last is true since $\frac{3}{2}(x-1) \ge x \iff x \ge 3$. It also tells us that equality occurs when there is only one prime, $p_1=3$. So equality occurs when $n = 2 \cdot 3^{a_1}$.

Case 3. $n=p_1^{a_1}\dots p_m^{a_m}$ when $2 \nmid n$ and all exponents are positive.
Same as Case 2..
This post has been edited 5 times. Last edited by Afo, Oct 18, 2021, 3:02 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8857 posts
#24 • 1 Y
Y by peter_infty
The logic behind this problem is a bit finicky to sort out, but nonetheless, it's a great problem.

The idea is to realize that every chain of $\phi$ applications that eventually reaches $1$ for some $n$ in $k$ applications contains some $i \leq k$ with $\phi^i(n)$ a power of two. On the other hand, because $\nu_2(\phi(n)) \geq \nu_2(n)$ when $n$ is not a power of $2$, we simply need to show that this maximal $\nu_2$ is at least $\log_3 n$.

Define $f(n)$ to be this value for some positive integer $n$. Because $\phi$ is multiplicative, the function $f(n)$ is logarithmically additive (more concretely, one can just convert the prime powers into powers of two separately until all odd primes disappear), and obviously $f(2) = 1$. Furthermore, $f(p) = f(p-1)$, so now $$f(p) = f(p-1) = 1+f\left(\frac{p-1}2\right) \geq 1+\log_3(p-1) - \log_3(2) \geq \log_3 p$$for odd primes $p$. Combined with additivity this is enough to show $f(n) \geq \log_3 n$ for all $n$, as needed.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4175 posts
#25 • 1 Y
Y by Jndd
woah

We need to show that starting from $n$, we need to apply $\phi$ at least $\log_3(n)$ times to reach 1.

Alice likes eating berries. She has $v_2(n)$ "type 2" berries, $v_3(n)$ "type 3" berries, $v_5(n)$ "type 5" berries, and so on, she has $v_p(n)$ type $p$ berries for each prime $p$. However, for whatever reason, when Alice eats a type $p$ berry, she gains another $v_2(p-1)$ type 2 berries, $v_3(p-1)$ type 3 berries, and so on (in particular, eating a type 2 berry has no gain). On each turn, Alice will eat one berry of every type that she has. The problem statement is thus equivalent to the assertion that Alice will be able to eat for at least $\log_3(n)$ turns before running out of berries.

Define the value of a type $p$ berry as the number of type 2 berries that will come out of it eventually. For example, types 2,3,5,7,11 have values of 1, 1, 2, 2, and 3.

Claim: A type $p$ berry has a value of at least $\log_3(p).$ We will show this by induction. Let $s(p)$ be the value of berry $p$. This is true for $p=2,3,5,7,11$ as shown earlier. Now, note that after eating a type $p$ berry, Alice gains a bunch of berries whose product of types is $p-1.$ Let these berries be $q_1,q_2\cdots q_k$ (not necessarily distinct). Note that for all $i$, $q_i<p$. The value of the original berry is equal to the sum of the values of these berries. By our inductive hypothesis, $$s(p)=\sum_{i=1}^k s(q_i)\geq \sum_{i=1}^k \log_3(q_i)=\log_3(p-1).$$However, note that $s(p)$ is an integer, but $\log_3(p-1)$ is never an integer other than $p=2$, as that requires $p$ to be even, so this can actually be strengthened to $$s(p)\geq \log_3(p),$$which shows the claim inductively.

Therefore, each berry of type $p$ will produce at least $\log_3(p)$ berries of type 2 eventually. Let Alice's original berries be $b_1,b_2\cdots b_m$. Then, $$\sum_{i=1}^m s(b_i)\geq \sum_{i=1}^m \log_3(b_i)=\log_3(\prod_{i=1}^m b_i)=\log_3(n),$$so at least $\log_3(n)$ type 2 berries are produced. This clearly implies the result as no more than one type 2 berry is consumed at each turn, so we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
NoctNight
108 posts
#26
Y by
Define $\phi^m(n)$ to be $m$ applications of $\phi$. Let $\Omega(n)$ be the number of distinct odd prime divisors of $n$. Then, let
$$X=\sum_{i=0}^{k-1} \Omega(\phi^i(n))$$The key observation is that at each application of $\phi(m)$, we have
$$\nu_2(\phi(m))\geq \nu_2(m)+\Omega(m)-1$$which comes from $\phi(m)=m\prod_{p\mid m}\frac{p-1}{p}$ where $2\mid p-1$ except for $p=2$ which decreases $\nu_2(\phi(m))$ by $1$. Thus,
$$0=\nu_2(\phi^k(n))\geq -k+\nu_2(n)+\sum_{i=0}^{k-1} \Omega(\phi^i(n))\geq X-k$$so $X\leq k$. But then, if $a_1,a_2,\ldots, a_X$ are the odd prime factors counted in $X$ in any order,
\begin{align*}
n&=\frac{n}{\phi(n)}\cdot \frac{\phi(n)}{\phi^2(n)}\cdot\cdots\cdot \frac{\phi^{k-1}(n)}{\phi^k(n)}\\
&\leq 2^k \prod_{i=1}^X \frac{a_i}{a_i-1}\\
&\leq 2^k \prod_{i=1}^k \frac{3}{2} && (X\leq k)\\
&=3^k.
\end{align*}as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Leo.Euler
577 posts
#27
Y by
Lemma: For all positive integers $n$, $\nu_2(\varphi(n)) - \nu_2(n) \ge -1$.

Proof. Note that \[ \nu_2(\varphi(n)) = \nu_2(n)+\sum_{\text{prime} \ p|n} (\nu_2(p-1)-\nu_2(p)) \ge \nu_2(n)+g(n),\]
where $g(n)=-1$ if $n$ is even and $g(n)=0$ if $n$ is odd; this follows immediately from the well-known formula for $\varphi(n)$. The claim follows. $\square$

Claim: Define the function $f(n)$ by
  • $f(ab)=f(a)+f(b)$ for all positive integers $a$ and $b$;
  • $f(2)=1$ and $f(p)=f(p-1)$ for all primes $p$.
Then $k \ge f(n)$.
Proof. Induction, followed by application of the Lemma. $\square$

Claim: For all positive integers $n$, $f(n) \ge \log_3(n)$.
Proof. We use strong induction, where the base cases $n=1, 2$ is easy. By the logarithmic nature of $f$, it suffices to prove $f(p) \ge \log_3(p)$ for prime $p$ as the inductive step. We have \[ f(p) = f\left(\frac{p-1}{2}\right)+f(2)= f\left(\frac{p-1}{2}\right)+1 \ge \log_3(p-1)-\log_3(2)+1 = \log_3(p-1) + \log\left(\frac{3}{2}\right) \ge \log_3(p-1)+\log\left(\frac{p}{p-1}\right)=\log_3(p), \]completing the proof. $\square$

By the above two claims, $k \ge \log_3(n)$, or $n \le 3^k$, and we are done.
This post has been edited 1 time. Last edited by Leo.Euler, May 18, 2023, 10:22 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#28
Y by
Incredibly long solution i got lol
Solved through the walkthrough of OTIS Excerpts.
Let w(ab)=w(a)+w(b), w(p)=w(p-1), and w(2)=1, with p a prime and w a function defined from natural inputs to integer outputs. Essentially, if i*2^j=n=ab even, where i is odd, obviously w(n)=w(i)+j, counting the original powers of two (which are already produced). Now for odd $n=p_1^{e_1}...p_k^{e_k}$, $$w(n)=e_1w(p_1-1)+...+e_kw(p_k-1).$$
Now the critical thing to see is that this represents the powers of two produced as phi is applied. This is because if we assume that this holds for base cases p-1, which makes the descent until the obvious p=2 and 3, $e_lw(p_l)=e_lw(p_l-1)$, which it's obvious that phi(n) also gets rid of p_l and replaces with p_l-1 every application as well. This makes the descent of replacing larger numbers with smaller, retaining the property of applications of phi(n), until we get to only w(2)s, which are just the number of powers of 2. $\square$

Obviously k is the number of phi(n) applications from when n has odd factors plus the applications when n has only powers of 2, hence k is at least w(n). So if we prove the needed inequality holds for primes, it will obviously hold for composites (since $w(n)=e_1w(p_1)+...\ge log_{3}{p_1^{e_1}}+...=log_{3}{n}$). Then by strong induction (and these inductive hypotheses will descent down until p=2 and 3, where it is trivial that it holds (w(3)=1=log_3{3})), we have that $$w(p)=w(2)+w(\frac{p-1}{2})\ge log_3{3}+log_3{\frac{p-1}{2}}=log_3{\frac{3(p-1)}{2}}\ge log_3{p},$$as desired. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
atdaotlohbh
171 posts
#29
Y by
That's a great number theory problem and I hope we will face a lot of beatiful NT problems like this one in the future!
Let's say $n=2^k*p_1^{\alpha_1}*\ldots$, then $\phi(n)=2^{k-1}p_1^{\alpha_1-1}(p_1-1)\ldots$. If $k \geq 1$, we say that a power of two destroyed a two(if $k=0$ then nothing was destroyed), and $p_i$ has built $v_2(p_i-1)$ twos. Now here comes the key claim:
Key claim In the process of applying $\phi$ function to $n$ untill the results becomes $1$ at least $log_3(n)$ twos will be built, including $v_2(n)$ initial twos.
Proof: we proceed with induction on $n$. Base: $n=1$ is obvious.
Induction step: first, consider even $n$. Let $k=v_2(n)$, $n=2^kX$. Then by induction in the process of $X$ at least $log_3(X)$ two will be built. We have $k$ initial so at least $k+log_3(X)=log_3(X*3^k)>log_3(n)$ will be built.
Now, suppose $n$ is odd. Then $n=p_1^{a_1}*\ldots*p_k^{a_k}$. Suppose $k>1$. Then by induction at least $log_3(p_1^{a_1})+\ldots+log_3(p_k^{a_k})=log_3(n)$ twos will be produced. Now $k=1$. If $a_1>1$, then by induction at least $a_1log_3(p_1)=log_3(n)$ twos will be produced. Now $n=p$ - prime. Then $\phi(n)=p-1$. If $p=2,3$ we can manually check that everything works. Otherwise, $\lceil log_3(p) \rceil=\lceil log_3(p-1) \rceil$ (cause none of this two can be a power of three), hence we are done.

Now let's finish. Note that every step destroys at most one two, thus during the whole process at most $k$ twos were destroyed. At least $log_3(n)$ were built, thus $n \leq 3^k$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Zany9998
10 posts
#30
Y by
Lemma:
\[
    \forall n \in \mathbb{N} , \frac{n}{\varphi(n)} \leq 3 \cdot \left( \frac{3}{2}\right)^{v_2(\varphi(n))-v_2(n)}
\]Proof: Note that if $n=2^k$ for some $k\geq 0$ then this result holds trivially. Now let's assume that some odd prime divides $n$. Let $S$ denote the set of all primes dividing $n$ and $G$ denotes set of all odd primes dividing $n$.
Then note that $v_2(\varphi(n)) \geq v_2(n) + |G|  -1$ as each odd prime will add at least one power of $2$ and only one power of 2 can be taken out from the even part.
Hence $|G| \leq  v_2(\varphi(n))-v_2(n) +1 $
Now note that.
\[
				 \frac{n}{\varphi(n)} = \prod_{p \in S}\left(1 + \frac{1}{p-1} \right) \leq 2\cdot \prod_{p \in G}\left(1 + \frac{1}{p-1} \right) \leq 2 \cdot \left(\frac{3}{2} \right)^{|G|} \leq 2 \cdot \left(\frac{3}{2} \right)^{v_2(\varphi(n))-v_2(n) +1 }
				 \]which proves our original claim.
Now let $f_t(m) = \frac{\varphi ^ {t-1} (m)}{\varphi ^ {t} (m)}$ where $t,m \in \mathbb{N}$ and $g^t(m) $ is the function $g$ applied to $m$ total $t$ times (if $t=0$ then $g^t(m)=m$).
Then note that
\[
		\prod_{i=1}^{i=k}  f_t(n) \leq \prod_{i=1}^{i=k} 3 \cdot   \left( \frac{3}{2}\right)^{v_2(\varphi^{t}(n))-v_2(\varphi^{t-1}(n))}
		\]Hence
\[
		n \leq 3^k \cdot   \left( \frac{3}{2}\right)^{-v_2(n)} \leq 3^k
		\]QED
Note: We can get the best bound of $n \leq 2\cdot3^{k-1}$ by considering the parity of $n$, if $n$ is even we get
$n \leq 3^k \cdot   \left( \frac{3}{2}\right)^{-v_2(n)} \leq 2\cdot3^{k-1}$ . If $n$ is odd we can take out a factor of 2 from the bound of $\frac{n}{\varphi(n)}$ and therefore get $n \leq \frac{3^k}{2}$. Hence $n \leq 2\cdot3^{k-1}$. And note that $\varphi ^ {k} (2\cdot3^{k-1}) =1 $, so it is the best possible bound.
This post has been edited 1 time. Last edited by Zany9998, Mar 31, 2025, 1:57 PM
Z K Y
N Quick Reply
G
H
=
a