3 ms·
UPDATE: Thanks to comments from readers we have found that the pattern does not exactly match the GCD triangle for some values of the number of cells and rows.
by airesearcher 8y ago
UPDATE:
Thanks to comments from readers we have found that the pattern does not exactly match the GCD triangle for some values of the number of cells and rows.
This possibly makes it a more interesting finding. But it also means we can’t use GCD to render it quickly for all values.
In the code on Observable we were using GCD as a shortcut to render it because it saved time compared the earlier approach. However readers correctly pointed out that the rendering was not always correct using GCD.
Now that we know GCD doesn’t apply to all values of n, we are reverting to the original code, which generates the correct renderings for all values - but is slower - and there will be an update on Observable soon.
Meanwhile - to see the original code at work, and test it out for any value yourself, here is the Mathematica notebook code:
Https://GitHub.com/shaunxcode/a-pattern-in-the-primes
The Observable JavaScript code is being updated soon to account for this.
Join the discussion in the Telegram group as well - details below.