Files
rose-ash/lib/ocaml
giles 46e49dc947
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s
ocaml: phase 5.1 euler30_cube.ml baseline (sum of digit-cube narcissistic numbers <= 999 = 1301)
Numbers equal to the sum of cubes of their digits:
  153 = 1 + 125 + 27
  370 = 27 + 343 + 0
  371 = 27 + 343 + 1
  407 = 64 + 0 + 343
  sum = 1301

Implementation:
  pow_digit_sum n p   walk digits of n, accumulate d^p
  euler30 p limit     scan 2..limit and sum where pow_digit_sum n p = n

Real PE30 uses 5th powers (answer 443839); the cube version
exercises the same algorithm in a smaller search space.

118 baseline programs total.
2026-05-09 23:17:00 +00:00
..