Coding Challenge #110: Recamán's Sequence - Part 1

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=DhFZfzOvNTU



Duration: 23:59
59,811 views
1,515


In this coding challenge, I visualize the Recamán’s number sequence using the p5.js library and go on to generate a series of musical tones using p5.js sound. Code: https://thecodingtrain.com/challenges/110-recamans-sequence

p5.js Web Editor Sketches:
🕹️ Recamán's Sequence - Part 1: https://editor.p5js.org/codingtrain/sketches/2OSiAFU7k
🕹️ Recamán's Sequence - Part 2: https://editor.p5js.org/codingtrain/sketches/2CRSf-wRL

Other Parts of this Challenge:
📺 Recamán's Sequence - Part 2: https://youtu.be/pYnaBQgnARQ

🎥 Previous video: https://youtu.be/Ae73YY_GAU8?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Next video: https://youtu.be/3noMeuufLZY?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
📘 Recamán's Sequence on MathWorld: http://mathworld.wolfram.com/RecamansSequence.html
🔖 Recamán's Sequence on Wikipedia: https://en.wikipedia.org/wiki/Recam%C3%A1n%27s_sequence
🗐 OEIS: http://oeis.org/
🗏 Bernardo Recamán Santos: https://es.wikipedia.org/wiki/Bernardo_Recam%C3%A1n_Santos

Videos:
👻 The Slightly Spooky Recamán's Sequence: https://youtu.be/FGC5TdIiT9U
🎹 Recamán's Sequence by Dale Gerdemann: https://youtu.be/h3qEigSSuF0
🚂 Tutorial Playlist on p5.js Sound: https://youtube.com/playlist?list=PLRqwX-V7Uu6aFcVjlDAkkGIixw70s7jpW
🔴 Coding Train Live 146: https://youtu.be/XXwjcxMOA8s?t=2137s

Related Coding Challenges:
🚂 #140 Leibniz Formula for Pi: https://youtu.be/uH4trBNn540
🚂 #133 Times Tables Cardioid Visualization: https://youtu.be/bl3nc_a1nvs
🚂 #C2 Collatz Conjecture: https://youtu.be/EYLWxwo1Ed8

Timestamps:
0:00 Introduction!
1:56 Discussing the Recamán's Sequence
6:08 Starting to code and adding the prerequisites to generate the sequence
7:18 Writing the algorithm to generate the numbers of the sequence
8:36 Testing the algorithm
9:40 Adding the counter
10:44 Visualizing the algorithm!
13:48 Making continuous series of arcs instead of ellipses
16:20 An exercise to pause and try for yourself!
16:50 Creating an Arc class and an array of arcs
19:33 Scaling down the animation as we move along the Recamán's Sequence
21:34 Scaling down by the biggest number in the sequence generated so far
22:34 Explore the Recamán's Sequence and share your works!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://thecodingtrain.com/discord
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter: https://twitter.com/thecodingtrain
📸 Instagram: https://www.instagram.com/the.coding.train/

🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org

📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#numbersequence #recamanssequence #music #audiovisual #visualization #p5js #javascript







Tags:
daniel shiffman
creative coding
coding challenge
tutorial
coding
challenges
coding train
the coding train
live stream
class
challenge
codingtrain
code challenge
recaman
recaman's sequence
recaman numberphile
javascript (programming language)
programming challenge
p5.js tutorial
recaman sequence
recaman sequence music
recaman sequence audio
recaman sequence sound
recaman sequence visual