Pascal Triangle monsters. I am plotting the rows of Pascal triangle as 32 digit binary numbers in column across the screen. The binary numbers are arranged from bottom to top. So a single square at the bottom indicates a 1, a single square one place above the bottom indicate a 2, and two squares one in the bottom and one directly above indicates a 3, and so on.
The images it creates are symmetrical as the numbers in the triangle are. The central numbers get big pretty quickly.
This is inspired by wolfram math visualizations.
just in time for Halloween
A binary plot visualizer made in p5.js to plot number sequences, inspired by some plots plots in Wolfram's Mathworld.
It can be adjusted to plot 8 and 16 bit numbers (and others as well) I am plotting in binary the natural numbers from 0 to 255. These are 8 bit numbers the leftmost slice is zero and right most is 255. I start counting from the bottom up.
I have plotted the first 255 squares, cubes and triangular numbers too.
squares and triangular numbers are 16bit and cubes need to be 24 bit so the largest number 16581375 doesn't overflow
A need python hack is to use bit_length
>>> a = 16581375
>>> a.bit_length()
24
I was also inspired by a talk by Douglas Hofstadter on intertwined patterns of integers and patterns of thought.
#p5js #binary #creativecoding #numbersequences #math #python
I have added to plots of the Collatz conjecture, 3n+1
For all numbers 1 to 255 (starts at one for the collatz plots)
for example:
- from 1 to 1 takes 0 steps so a length of 0
- from 2 to 1 one takes 1 steps so a length of 1
- from 3 to 1 takes 7 steps [3, 10, 5, 16, 8, 4, 2, 1] so a length of 7
- the largest number of steps to one for numbers up to 255 is 127 so I am using 8 bit numbers
for example the sum for 3 will be 49
[3, 10, 5, 16, 8, 4, 2, 1] = 49