# Cicada Principle Pattern Generator

## Discover patterns inspired by nature's prime number cycles

Settings
About

Pattern cycle length: 105 elements

Current primes: 3, 5, 7

The pattern will fully repeat after 105 elements. This is the Least Common Multiple (LCM) of the three prime numbers.

### Prime Numbers

First Prime:
3
Second Prime:
5
Third Prime:
7

### Colours

Colour 1:
Colour 2:
Colour 3:

### Pattern Options

Background:

### Canvas Settings

Cell Size:
20px

### What is the Cicada Principle?

The Cicada Principle is a mathematical concept inspired by nature's periodic cicadas that emerge in prime number cycles (like 13 or 17 years). This natural phenomenon creates patterns that appear random but are actually deterministic.

In design and computer science, the Cicada Principle uses prime numbers to create non-repeating patterns. By overlaying multiple patterns with prime-number-based frequencies, we can create complex arrangements that don't fully repeat until the least common multiple (LCM) of all the prime numbers is reached.

### How it Works in CSS

In web design, the Cicada Principle is often implemented using CSS's `nth-child()` selector. For example:

/* Cicada Principle Pattern CSS */ .element:nth-child(3n) { background-color: #3B82F6; } .element:nth-child(5n) { background-color: #F472B6; } .element:nth-child(7n) { background-color: #10B981; }

With primes 3, 5, and 7, this pattern won't fully repeat until the 105th element (3 × 5 × 7 = 105), creating an organic-looking, non-repeating pattern that's more interesting than a simple repeating sequence.

### Applications

The Cicada Principle has applications in:

- Web design and user interfaces
- Generative art and creative coding
- Texture and pattern generation
- Data visualization
- Game development (procedural generation)