From the literature, showed below, I know two gadgets that provide a way to know if a positive integer (a positive quantity of units) is composite or a prime number. I would like to know if in the literature or from your invention it is possible to show other different gadgets that provide us primality tests.

Question. Do you know different gadgets or mechanisms from the literature that can be used as a primality test? Then, please add the references asnwering my question as a reference request and I try to read it from the literature. Are you able to provide a different gadget from your invention that provide (its idealization as a physical machine) a way to determine if a quantity (of something) is prime or composite? Many thanks.

Feel free to provide draws of your machine as companion of your explanation of how and why works it as a primality test.

## References:

[1] A. K. Dewdney, On the spaghetti computer and other analog gadgets for problem solving, Scientific American Volume 250  Issue 6 (June 1984), Computer Recreations p. 19-26.

[2] Francisco Javier Díaz Aspe, Cómo detectar primos usando una cuerda con nudos, Miniaturas matemáticas de La Gaceta de la RSME, La Gaceta de la Real Sociedad Matemática Española, Núm. 1, Pág. 80 Vol. 22 (2019).

• Does a computer count as a gadget? – Gerry Myerson Nov 28 '19 at 11:26
• I think we shouldn't accept it as a gadget @GerryMyerson if you mean a modern computer. On the other hand if there are simple and primitive machines that computes/checks if an integer is prime, these can be an example from my point of view. My idea are similar and simple gadgets than [1] or [2]. – user142929 Nov 28 '19 at 12:50

We report the first experimental demonstration of prime number sieve via linear optics. The prime numbers distribution is encoded in the intensity zeros of the far field produced by a spatial light modulator hologram, which comprises a set of diffraction gratings whose periods correspond to all prime numbers below 149. To overcome the limited far field illumination window and the discretization error introduced by the finite spatial resolution, we rely on additional diffraction gratings and sequential recordings of the far field. This strategy allows us to optically sieve all prime numbers below $$149^2 = 22201$$.