Prime Attraction

Numbers attract based on shared prime factors

Controls

5 100

How It Works

Each particle represents a number. Particles attract each other based on shared prime factors. The more prime factors two numbers share, the stronger their attraction.

Example 1

12 (2×2×3) and 18 (2×3×3) share two prime factors (2 and 3) so they attract strongly.

Example 2

7 (prime) and 11 (prime) share no factors so they repel each other.

Example 3

15 (3×5) and 20 (2×2×5) share one factor (5) so they have moderate attraction.