Computation Workshop Solution Checker

Recursively Defined Function

The function \(f\) is defined on positive integers by \(f(p)=1\) for all prime numbers \(p\), and \(f(xy) = xf(y) + yf(x)\) for all positive integers \(x\) and \(y\). We are interested in finding integers \(n\) such that \(n=f(n)\).

Part A Determine the smallest \(n>2023\) such that \(f(n)=n\).
Part B Determine the smallest \(n>1000000\) such that \(f(n)=n\).