Write a function to find integers n less than or equal to an input value m that solve the equation sigma(n-1) = phi(n+1). The function sigma(x) gives the sum of divisors of x; for example, sigma(15) = 1+3+5+15 = 24. The totient function phi(x) counts numbers less than x that are relatively prime to x. For example, phi(15) = 8 because 1, 2, 4, 7, 8, 11, 13, and 14 are relatively prime to 15; that is, the greatest common divisor of 15 and each of the eight numbers is 1.
An oblique hint is that I call solutions to sigma(n-1) = phi(n+1) “Beatriz numbers” in honor of a good friend and former co-worker of EmilyR and JessicaR. The natural search will not help, unless you are interested in combinatorics related to Higham’s conjecture.

Solution Stats

18 Solutions

9 Solvers

Last Solution submitted on Dec 07, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...