Canonical: https://toolipedia.app/number-pattern-generator

# Number Pattern Generator

Draw the Ulam or Sacks prime spiral, a number spiral with the numbers written in, or a palindromic, consecutive or Pascal number pyramid, and save the image.

Breadcrumbs: Toolipedia > Online calculators > Maths and school calculators > Number Pattern Generator

## About Number Pattern Generator

Generate classic prime and number patterns on a canvas you can save as a PNG. The Ulam spiral writes the numbers on a square spiral and marks primes, which gather along diagonals; the Sacks spiral places n at radius √n and angle 2π√n. A number spiral shows the numbers themselves, and text pyramids list repunit squares (11 × 11 = 121), consecutive numbers or Pascal's triangle. A 21 × 21 Ulam grid from 1 contains 85 primes.

## How to use Number Pattern Generator
1. Choose a pattern and set its size.
2. For spirals, change the first number to see other starting points, such as 41.
3. Read the prime count, then press Save as PNG or copy the text pyramid.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- number pattern generator
- ulam spiral generator
- sacks spiral
- prime spiral
- number spiral
- pascal triangle generator
- number pyramid

## Frequently asked questions

### Why do primes line up in the Ulam spiral?

Diagonals correspond to quadratic polynomials such as n² + n + 41, and some of those produce many primes. No complete explanation is known for every streak.

### How big can the grids be?

Square spirals up to 400 × 400 (160,000 numbers), the Sacks spiral up to 20,000 numbers, and pyramids up to 30 rows, with repunit squares limited to 9 ones.

### What is special about starting the Ulam spiral at 41?

Euler's polynomial n² + n + 41 gives primes for n = 0 to 39, and its values fall on two neighbouring diagonals when the spiral starts at 41, so those diagonals are unusually rich in primes.

### Is Number Pattern Generator free?

Yes. Number Pattern Generator on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with Number Pattern Generator:
- [Pascal's triangle generator](https://toolipedia.app/pascals-triangle-generator)
- [Prime number checker and prime list](https://toolipedia.app/prime-number-checker)
- [Golden ratio calculator](https://toolipedia.app/golden-ratio-calculator)
- [Volume calculator](https://toolipedia.app/volume-calculator)
- [Sequence Pattern Finder and Series Sum](https://toolipedia.app/sequence-pattern-finder-and-series-sum)
