Skip to main content
deleted 9 characters in body
Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53

Ruby, 34 29 26 2622 bytes

x=0;loop{p$.+=184while (x+=184)p$./629%2}

Try it online!

Quick explanation: this works because of the magic number 629. I noticed that the sequence starts repeating after the 629th element, and I tried to "improve" some existing answer, using only integer math. I found that the other "magic number" (0.29253) is actually 184/629.

Try it online!

Ruby, 34 29 26 bytes

x=0;loop{p (x+=184)/629%2}

Quick explanation: this works because of the magic number 629. I noticed that the sequence starts repeating after the 629th element, and I tried to "improve" some existing answer, using only integer math. I found that the other "magic number" (0.29253) is actually 184/629.

Try it online!

Ruby, 34 29 26 22 bytes

$.+=184while p$./629%2

Try it online!

Quick explanation: this works because of the magic number 629. I noticed that the sequence starts repeating after the 629th element, and I tried to "improve" some existing answer, using only integer math. I found that the other "magic number" (0.29253) is actually 184/629.

added 277 characters in body
Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53

Ruby, 34 29 26 bytes

x=0;loop{p (x+=184)/629%2}

Quick explanation: this works because of the magic number 629. I noticed that the sequence starts repeating after the 629th element, and I tried to "improve" some existing answer, using only integer math. I found that the other "magic number" (0.29253) is actually 184/629.

Try it online!

Ruby, 34 29 26 bytes

x=0;loop{p (x+=184)/629%2}

Try it online!

Ruby, 34 29 26 bytes

x=0;loop{p (x+=184)/629%2}

Quick explanation: this works because of the magic number 629. I noticed that the sequence starts repeating after the 629th element, and I tried to "improve" some existing answer, using only integer math. I found that the other "magic number" (0.29253) is actually 184/629.

Try it online!

deleted 74 characters in body
Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53

Ruby, 34 29 2926 bytes

x=0;loop{p (0..999x+=184).map{|x|x*184/629%2}

Try it online!Try it online!

Ruby, 34 29 bytes

p(0..999).map{|x|x*184/629%2}

Try it online!

Ruby, 34 29 26 bytes

x=0;loop{p (x+=184)/629%2}

Try it online!

deleted 229 characters in body
Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53
Loading
Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53
Loading