Let P(n) stand for the biggest prime divisor of n, and define P(1)=f(1)=1. We first prove two lemmas.
Lemma 1: For positive integer n and prime p∣n, we have f(n)≤∑d∣pnf(d).
Proof of Lemma 1: For any factoring of n, write n=n1n2⋯nk. Since p∣n, there exists i∈{1,⋯,k} such that p∣ni (if there are more than one such i, choose any one of them), without loss of generality, assume i=1. Map this factoring to a factoring of d=n1n, d=n2n3⋯nk.
For two different factorings of n, n=n1n2⋯nk and n=n1′n2′⋯nk′ (where p divides n1 and n1′):
- If n1=n1′, then d=n2⋯nk and d=n2′⋯nk′ are two different factorings of d (d is a divisor of pn).
- If n1=n1′, then d=n1n=n1′n=d′, so these two factorings map to a factoring of d and d′ respectively (d and d′ are divisors of pn).
Thus f(n)≤∑d∣pnf(d). Lemma 1 is proved.
Lemma 2: For positive integer n, let g(n)=∑d∣nP(d)d, then g(n)≤n.
Proof of Lemma 2: Induce on the number of different prime divisors of n.
- When n=1, g(1)=1.
- When n=pa is a prime power,
g(n)=1+1+p+⋯+pa−1=1+p−1pa−1≤1+pa−1=n.
Assume when the number of different prime divisors of n is k, we have g(n)≤n. Consider the situation when n has k+1 different prime divisors. Let the prime factorization of n be n=p1a1⋯pkakpk+1ak+1, where p1<⋯<pk<pk+1, and write n=mpk+1ak+1. So
g(n)=g(m)+d∣m∑i=1∑ak+1pk+1dpk+1i=g(m)+σ(m)pk+1−1pk+1ak+1−1,
where σ(m) stands for the sum of positive divisors of m. By assumption, g(m)≤m.
Since
σ(m)pk+1−1pk+1ak+1−1=(i=1∏kpi−1piai+1−1)pk+1−1pk+1ak+1−1≤(i=1∏kpi+1−1piai+1−1)(pk+1ak+1−1)≤(i=1∏kpipiai+1−1)(pk+1ak+1−1)≤(i=1∏kpiai)(pk+1ak+1−1)=n−m,
so g(n)≤n. Lemma 2 is proved.
Back to the problem, it is sufficient to prove, for positive integer n, f(n)≤P(n)n holds.
Induce on n. When n=1, the equality holds. Assume for n=1,2,…,k, we have f(n)≤P(n)n. Then when n=k+1, by Lemma 1, Lemma 2, and the assumption,
f(k+1)≤d∣P(k+1)k+1∑f(d)≤d∣P(k+1)k+1∑P(d)d=g(P(k+1)k+1)≤P(k+1)k+1.