# Creative Racket Competition 2022: January 1, 2022 → February 28, 2022

**URL:** <https://racket.discourse.group/t/creative-racket-competition-2022-january-1-2022-february-28-2022/454>\
**Category:** General\
**Tags:** event, standard-fish, creative-racket\
**Created:** [December 20, 2021, 4:41pm UTC](https://racket.discourse.group/t/creative-racket-competition-2022-january-1-2022-february-28-2022/454 "2021-12-20T16:41:19Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [January 29, 2022, 10:48pm UTC](https://racket.discourse.group/t/creative-racket-competition-2022-january-1-2022-february-28-2022/454/11 "2022-01-29T22:48:36Z")

</div>

A new entry in the Creative Racket Competition:

# Miller-Rabin Liars

> Primality tests like the [Fermat test](https://en.wikipedia.org/wiki/Fermat_primality_test) and the [Miller-Rabin test](https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test) rely on so-called "witnesses." In the case of Fermat, if `a^{p-1} = 1 (mod p)` , for some `a` , then `p` is probably prime. The `a` is called a Fermat witness. However, if a composite passes the test for a given `a` , then `a` is called a Fermat **liar**. The same principle holds for Miller-Rabin, although the equation is slightly more complicated.
> 
> Which numbers are the most honest? Which ones are the most lying? That's what the given visualization is supposed to show. This is also a gradually typed program. The numeric computation happens in Typed Racket, while the visualization part happens in untyped Racket.

 ![1024-100000-none](https://global.discourse-cdn.com/free1/uploads/racket/original/1X/0cb5cbca0904846963d3525094a9a17814307baa.png)

---

_[View the full topic](https://racket.discourse.group/t/creative-racket-competition-2022-january-1-2022-february-28-2022/454)._
