diff --git a/44/main.ua b/44/main.ua index 40df448..b34abec 100644 --- a/44/main.ua +++ b/44/main.ua @@ -1,10 +1,8 @@ -# Experimental! -# project euler 44 -p ← ÷2×⊸(-1×3) -c ← =0-⊸⌊°p -# ⧈₂/(↧∩c⊃+-) p +1⇡100 -# ⍢+₁/(¬↥∩c⊃+-∩p) 1_2 -# &p⟜/-p -⌊▽⊸(c∂p) +1.5⇡100000000 -≡(p⊂⟜+₁) -▽⊸(c≡/+) +# pentagonal(n) ? n +P ← ÷2×⊸(-1×3) +# is_pentagonal(n) ? n +IsP ← =⟜⌊°P + +⧅<2 P+1⇡3000 # pentagonal number pairs +▽⊸(/(↧∩IsP⊃+-)⍉) # sum and diff are pent +/-⊢ # get first such (which is minimal)