WalrusIRC & Discord main room

If you have a forum account, have more than 4 posts and are not part of a restricted usergroup, then you can chat in our main Discord server room directly from here and continue using the forums at the same time. Or you can join our server directly and access many more discussion rooms!

Author Topic: The Recamán Sequence (Code Golf)  (Read 1037 times)

0 Members and 2 Guests are viewing this topic.

Juju

• aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
• CodeWalrus Staff
• Super User
• Server Maintenance
• Moderator
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Join Date: Nov 2014
• Location: Inside a walrus
• Posts: 3262
• Post Rating Ratio: +39/-2
• Couch potato
• Gender:
• WalriiPoints: 99999
The Recamán Sequence (Code Golf)
« on: June 15, 2018, 01:55:44 am »
The Recamán Sequence is probably one of the most fascinating sequences in maths. It looks good, it sounds good too. Full explanation in the video below.

The image featured in this video in particular, it looks pretty cool so I reproduced it in about 335 277 274 bytes.

Code: (svg) [Select]
`<svg xmlns="http://www.w3.org/2000/svg"><path id="p" stroke="#000" fill="none"/><script>/*<![CDATA[*/q=[];a="M2,325";for(s=i=0;i<65;)c=s-++i<=0||!!~q.indexOf(s-i),q.push(s+=j=i*c*2-i),a+="a1,1 0 0,"+(i%2^c)+" "+j+"0,0";document.all[1].setAttribute("d",a)//]]></script></svg>`
Check this out!

Can you do better?
« Last Edit: June 16, 2018, 07:54:49 pm by Juju »

• Consoles, mobile devices and vintage computers owned: A lot
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

_iPhoenix_

• Custom title
• Super User
• Join Date: Mar 2017
• Location: Location
• Posts: 668
• Post Rating Ratio: +16/-1
• ███████ ▼ ♪ Best music ♫
• Gender:
Re: The Recamán Sequence (Code Golf)
« Reply #1 on: June 16, 2018, 10:37:16 am »
Your code does not work for me (latest version of chrome, Mac); what browser are you using?
• Calculators owned: Two TI-84+ CE's

"walruses are better than tuxedo chickens, all hail the great " ~ me
Evolution of my avatar:

Juju

• aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
• CodeWalrus Staff
• Super User
• Server Maintenance
• Moderator
• Forum Maintenance
• Original 5
• CodeWalrus Supporter
• Join Date: Nov 2014
• Location: Inside a walrus
• Posts: 3262
• Post Rating Ratio: +39/-2
• Couch potato
• Gender:
• WalriiPoints: 99999
Re: The Recamán Sequence (Code Golf)
« Reply #2 on: June 16, 2018, 06:39:55 pm »
I use Vivaldi for Mac. So pretty much the same as you. And it works for me... weird. What did you do?
• Consoles, mobile devices and vintage computers owned: A lot