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? Nov 28, 2019 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]. Nov 28, 2019 at 12:50
• All users, after six months that was posted the answer I've decided accept it as an excellent answer. I think that this post will be useful for all those who want to know references for gadgets as primality tests, many thanks all. May 6, 2020 at 13:20

I interpret a "gadget" as a physical device that operates in an analog, rather than a digital way (to exclude a computer). The OP asks for "primality tests", but if I may broaden the question to include "prime number generators", there is a variety of such gadgets, collected at unusual and physical methods for finding prime numbers.

The gadgets use effects from chemistry (Biochemical identification of prime numbers), biology ( A Biological Generator of Prime Numbers, and physics An optical Eratosthenes' sieve for large prime numbers.

The latter would qualify as a primality test, I cite the abstract and show a figure from that paper:

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$$.