A formula to calculate all #prime numbers? Too good to be true:
youtu.be/j5s0h42GfvM

This is a masterpiece in explaining somewhat non-trivial #math in a simple fashion. 🙇 #videos

Follow

@publicvoit

>>> import math
>>> [x for x in range(2, 100) if all(x % y != 0 for y in range(2, int(math.sqrt(x)) + 1))]
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.