Skip to main content
added 864 characters in body
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Charcoal, 11 bytes

≔…·²NθI⁺θΠθ

Try it online! Link is to verbose version of code.

≔…·²Nθ

Create a list from 2 up to n inclusive.

I⁺θΠθ

Vectorised add the list to its product.

Of course, the given formula is just an existence proof and there are usually lower runs. For instance, the LCM is readily proven to produce a run:

Nθ≔…·²θηW⌈﹪±θη≧⁺ιθI⁺θη

Try it online! Link is to verbose version of code. Or more efficiently:

Nθ≔…·²θηFη≔⌊Φ×⊖ηθ¬﹪κιθI⁺θη

Try it online! Link is to verbose version of code.

Charcoal, 11 bytes

≔…·²NθI⁺θΠθ

Try it online! Link is to verbose version of code.

≔…·²Nθ

Create a list from 2 up to n inclusive.

I⁺θΠθ

Vectorised add the list to its product.

Charcoal, 11 bytes

≔…·²NθI⁺θΠθ

Try it online! Link is to verbose version of code.

≔…·²Nθ

Create a list from 2 up to n inclusive.

I⁺θΠθ

Vectorised add the list to its product.

Of course, the given formula is just an existence proof and there are usually lower runs. For instance, the LCM is readily proven to produce a run:

Nθ≔…·²θηW⌈﹪±θη≧⁺ιθI⁺θη

Try it online! Link is to verbose version of code. Or more efficiently:

Nθ≔…·²θηFη≔⌊Φ×⊖ηθ¬﹪κιθI⁺θη

Try it online! Link is to verbose version of code.

Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Charcoal, 11 bytes

≔…·²NθI⁺θΠθ

Try it online! Link is to verbose version of code.

≔…·²Nθ

Create a list from 2 up to n inclusive.

I⁺θΠθ

Vectorised add the list to its product.