Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

3 of 3
Commonmark migration

Oasis, 4 bytes

Code:

nj+U

Try it online!

Explanation:

Extended version:

nj+00
 0 = a(0)
 0 = a(1)
a(n) =
n # Push n
 j # Get the largest divisor under n
 + # Add to a(n - 1)
Adnan
  • 44.7k
  • 6
  • 83
  • 248

AltStyle によって変換されたページ (->オリジナル) /