← All text tools

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.

  • Free
  • No sign-up
  • Works on any device

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?

Also known as

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.