ocaml: phase 5.1 euler34_small.ml baseline (factorions <= 2000 = 145)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Number that equals the sum of factorials of its digits: 145 = 1! + 4! + 5! = 1 + 24 + 120 Implementation: fact n iterative factorial digit_fact_sum n walk digits, sum fact(digit) euler34 limit scan 3..limit, accumulate matches The only other factorion is 40585 = 4!+0!+5!+8!+5!. Real PE34 sums both (= 40730); 2000 keeps under our search budget. 121 baseline programs total.
This commit is contained in:
@@ -407,6 +407,11 @@ _Newest first._
|
||||
binary search tree (`type 'a tree = Leaf | Node of 'a * 'a tree *
|
||||
'a tree`) with insert + in-order traversal. Tests parametric ADT,
|
||||
recursive match, List.append, List.fold_left.
|
||||
- 2026-05-09 Phase 5.1 — euler34_small.ml baseline (numbers equal
|
||||
to sum of factorials of digits, ≤2000 = 145). 145 = 1!+4!+5! =
|
||||
1+24+120. The other "factorion" 40585 is the only number above
|
||||
this threshold; PE34 sums both = 40730. 121 baseline programs
|
||||
total.
|
||||
- 2026-05-09 Phase 5.1 — euler29_small.ml baseline (distinct a^b for
|
||||
2≤a,b≤5 = 15). 16 powers minus the one duplicate (4^2 = 2^4 = 16)
|
||||
→ 15 distinct values. Hashtbl as a set with unit-payload (the
|
||||
|
||||
Reference in New Issue
Block a user