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

2 of 3
added 216 characters in body
Adnan
  • 44.7k
  • 6
  • 83
  • 248

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 によって変換されたページ (->オリジナル) /