Skip to main content
added 27 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Haskell, 2826 bytes

-2 bytes thanks to H.PWiz.

((!!)$do x<-[0..]>>= \x->x<$[0];x<$[0..x])!!)

Try it online!Try it online!

This returns the nth element of the whole numbers where each i is replicated i + 1 times.

Haskell, 28 bytes

(([0..]>>= \x->x<$[0..x])!!)

Try it online!

This returns the nth element of the whole numbers where each i is replicated i + 1 times.

Haskell, 26 bytes

-2 bytes thanks to H.PWiz.

(!!)$do x<-[0..];x<$[0..x]

Try it online!

This returns the nth element of the whole numbers where each i is replicated i + 1 times.

added 105 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Haskell, 28 bytes

(([0..]>>= \x->x<$[0..x])!!)

Try it online!

This returns the nth element of the whole numbers where each i is replicated i + 1 times.

Haskell, 28 bytes

(([0..]>>= \x->x<$[0..x])!!)

Try it online!

Haskell, 28 bytes

(([0..]>>= \x->x<$[0..x])!!)

Try it online!

This returns the nth element of the whole numbers where each i is replicated i + 1 times.

deleted 3 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Haskell, 3528 bytes

(([1[0..]>>= \x->x<$[1>x<$[0..x+1]x])!!).pred

Try it online!Try it online!

Haskell, 35 bytes

(([1..]>>= \x->x<$[1..x+1])!!).pred

Try it online!

Haskell, 28 bytes

(([0..]>>= \x->x<$[0..x])!!)

Try it online!

deleted 2 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88
Loading
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88
Loading