Factorizer - https://news.ycombinator.com/item?id=10776019 - Dec 2015 (30 comments)
Animated Factorisation Diagrams - https://news.ycombinator.com/item?id=4788224 - Nov 2012 (72 comments)
Animated Factorization Diagrams - https://news.ycombinator.com/item?id=4713048 - Oct 2012 (2 comments)
Second this old comment!
Edit: I actually looked through https://news.ycombinator.com/submitted?id=imurray yesterday to see if there was anything we could invite a repost of. (I do this sometimes when looking at which users were first to submit an interesting article.) I didn't see anything, but on a second look https://news.ycombinator.com/item?id=7984992 could be interesting, so you'll get an email inviting you to repost that one, if you want to :)
If anyone is curious, 6561 (3^8) is the highest pure Sierpinski available in the animation since it caps at 10K.
Now i want (to build) a drag and drop toy where i can multiply or summarize numbers that are represented in this way. To see how factors move (like boids).
Is this visualization algorithm called something? The explanation link from a previous HN post seems to be broken: http://mathlesstraveled.com/2012/10/05/factorization-diagram...
Is there some non-regular polygon that would be more distinctly recognizable to use for 7, 11, etc?
7 = 2*3+1
11 = (2*2+1)*2+1
etc...
Filled polygons would offer some more shapes. Filled hexagon = 7, etc etc...
You could probably use the binary expansion to group the dots? So, 1 is • 2 is •• 3 is _• •_•
5 is
_• •_• •_•
7 is ____• _•_____• •_•___•_•
11 is ____• _•_____• •_•___•_• •_•___•_•
And so on.
(So, 2n is represented as n next to n, unless n is 2 in which case it is n above n, and 2n+1 is 1 above 2n )
Alternatively, using stars instead of n-gons could also be clearer?
Edit: I looked more at the animation some more and maybe I am wrong. Anyway I may try to make one.
I wrote an answer there that produced these diagrams from fairly few lines of code.
The question there referred to same now-broken link mentioned above so the origin still unknown.
E.g. 24 -> 2 * 3 * 4 = Two groups of (three groups of (four items))
Also try this for the archived version of that explanation -> https://web.archive.org/web/20130206023100/http://mathlesstr...
2. Sort factors in ascending order
3. Set var diagram to a single dot
4. Foreach factor in factors
4.1. Set var diagram to factor copies of diagram aranged in a circle
One advantage of svg is that each element has a DOM node, making interactivity trivial. (but I say this not having tried mouse targetting in canvas so maybe that's not hard)
Thanks for the insight.
e.g. when on 12, I'd like to see both 3x4 and 2x6, with a visual indicator of when the animation is showing the different factors... maybe the whole thing shrinks and additional factorizations fill in tiles subdividing the space
Knowing the number of different factorizations is an interesting and visually presentable quality that interacts in an interesting way with the factors themselves
eg 854-856, & 857 (prime) are all virtually or perfectly circular. Or maybe I'm observing not mathematical but neuro-visual principles.
The same principle is why this looks like a circle/ellipse but it isn't:
O
https://quickchart.io/sandbox/#%7B%22chart%22%3A%22%7B%5Cn%2...
And that's all it takes to end up at an unsolved problem in math.
You can spend a lifetime on this simple observation that "the jumps between neighbors are so dramatic", just trying to reconcile the complex relationships between the additive view of the world and the multiplicative one.
And we haven't even done anything like bring in complex numbers, or rationals, or introduce exponentiation!
You could try writing out an addition table and a multiplication table and see if you can find patterns and differences (you can).
The Sieve of Eratosthenes is good.
I asked ChatGPT what branch of mathematics high school algebra is and it suggested the field theory of real numbers. I have since been looking at groups and fields with some enjoyment.
I made a video that I thought of as a play on Ulam's Spiral [2][3] a while back. Instead of marking primes I marked points of the (square) spiral that were x mod n 0. It is sort of silly and maybe a bit confusing.
[1] https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
[2]https://en.wikipedia.org/wiki/Ulam_spiral
https://www.youtube.com/watch?v=fRzv1SXKCY8 (my video play it slowed down maybe)
One of the more general forms of this is the logarithm. The defining equation of the logarithm is that log(a*b) = log(a) + log(b). This turns multiplication into a nice linear addition problem.
A less general but more powerful transformation exists on the integers. You can factorize any integer into it's prime factors, then multiply by adding together the powers on matching primes. This may seem like more effort for a similar result, but the prime factors of an integer tell you a lot about that integers divisibility, so it's worth the effort.
If you're talking about the interplay between multiplication and addition: Get a degree in pure maths, learn lots of number theory, and cry at how inelegant it is. Trust me, I did it in a past life
http://www.datapointed.net/2012/10/animated-factorization-di...
Never got around to it. This is timely, as she's factoring in school now.
It similarly turns out the only "non-obvious" composite under this rule is 7*13=91, all the rest can be pretty quickly tested using the normal rules. 49 is 7², so it's similarly easy to recognize. All the others are an easy primality test.
A few randomly generated numbers to show this off:
* 31? Not divisible by 2, 3, or 5 - below 7² so no risk of 7 division either. Prime. 31=31¹.
* 69? Divisible by 3. 69 = 3*23. 23? Not divisible by 2, 3, 5 - so you can stop factoring there. 69=3¹23¹.
* 92? Divisible by 2, to 2*46 - again, divisible by 2, to 2²23 - 23 isn't divisible by 2, 3 or 5, so 92 = 2²23¹.
* 68 = 2¹34 = 2²17, and 17 is not divisible by 2, 3 or 5, so you can stop there. 2²17¹.
High school textbooks generally don't use numbers higher than 100 to preclude students who don't have calculators, so this trick came in handy many times for me. It also happens to gesture at the notion that primes are surprisingly common at low numbers, and then thin out rapidly as you climb higher and higher.
To apply the same trick to a multiple of 7, the tens column is worth 3 (10 % 7 = 3), so 91 -> 27 + 1 -> 6 + 8 -> 3 + 4 -> 7. The value is different in the next column (100 % 7 = 2). This trick is no help at all but I still like it.
(Finished editing out mistakes now.)
14 => 1 (3^1) + 4 (3^0) => 7 => divisible by 7.
21 => 6 (3^1) + 1 (3^0) => 7 => also divisible by 7.
7 * 53 = 371 => 3 (3^2) + 7 (3^1) + 1 (3^0) => 27 + 21 + 1 => 49 => ALSO divisible by 7!
My word! This is the intuition I always suspected was possible after studying how bases worked, but I never took the time to investigate on my own.
That's a repeating pattern. In the case of 3 the pattern has length 1, and it goes (1, 1, 1, ...). In the case of 7 the pattern has length 6, and it goes (1, 3, 2, 6, 4, 5), starting at the units column. If that looks a bit pseudorandom, there's a good reason, it's vaguely similar to an old-fashioned PRNG.
(The pattern starts again with 1 in the millions column, because 142857 * 7 = 999999. Hence 2 million divided by 7 has remainder 2, 3 million divided by 7 has remainder 3, and so on.)
So 371 should be understood as 3*2 + 7*3 + 1*1, which is 28.
Or as another example, 6993 => 6*6 + 9*2 + 9*3 + 3*1, which is 84.
chrsw•1mo ago
apples_oranges•1mo ago