← Complete problem index

PROJECT EULER · #0159

Digital Root Sums of Factorisations

Statement only · SolvedOriginal problem ↗

A composite number can be factored many different ways. For instance, not including multiplication by one, 24 can be factored in 7 distinct ways:

24=2×2×2×324=2×3×424=2×2×624=4×624=3×824=2×1224=24

Recall that the digital root of a number, in base 10, is found by adding together the digits of that number, and repeating that process until a number is arrived at that is less than 10. Thus the digital root of 467 is 8.

We shall call a Digital Root Sum (DRS) the sum of the digital roots of the individual factors of our number.
The chart below demonstrates all of the DRS values for 24.

FactorisationDigital Root Sum
2×2×2×39
2×3×49
2×2×610
4×610
3×811
2×125
246

The maximum Digital Root Sum of 24 is 11.
The function mdrs(n) gives the maximum Digital Root Sum of n. So mdrs(24)=11.
Find mdrs(n) for 1<n<1000000.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.