RECREATIONAL MATHEMATICS · PRIME NUMBERS

Embedded Palindromic or Symmetric Prime Patterns Generator

Created by Inder J. Taneja

Grow a seed by placing a digit block on its right and the reversed block on its left. Choose how many prime rows to seek and which digits may occur in the added blocks.

reverse(i) | seed | i → test for prime

A palindromic seed gives palindromic prime rows. With a non-palindromic seed such as 23 or 31, only the added sides are symmetric.

Example 1 · Palindromic prime pattern

Start with 181. Add block 111 on the right and its reverse on the left; then add block 11 on both sides.

181
111181111 = 111181111
1111118111111 = 1111118111111

Every row is prime and the whole number reads the same in both directions.

Example 2 · Symmetric sides around a prime

Start with 23. Add block 1 on both sides; then add block 111 on both sides of the new prime.

23
1231 = 1231
1111231111 = 1111231111

Every row is prime. The added sides are symmetric, while the center 23 keeps the whole number nonpalindromic.

To reproduce these examples, choose prime seeds, allowed digits 18, maximum block length 5, and 3 prime rows. The generator tests blocks in increasing order and takes the first prime extension at each step. Blue marks the starting seed; gold marks the added digits.

For a nonprime seed, the first accepted wrapping becomes prime row 1.
A prime seed counts as row 1; a nonprime seed is shown separately as row 0.
Enter the digits you want, for example 18. Only these digits are used in the added blocks.
The first eligible i that yields a prime is chosen at each row.
Downloads include every completed seed result.
Primality is tested deterministically for every displayed number. To keep the test exact in the browser, the search uses numbers below 264. A nonprime seed is shown as row 0 and is never labeled prime. If no prime wrapping is found within the chosen limits, the pattern is marked as stopped.
Choose settings, then generate.

References

  1. Inder J. Taneja, Embedded Palindromic Prime Numbers-I, RGMIA Research Report Collection, 20 (2017), pp. 1–86. RGMIA ↗
  2. Inder J. Taneja, Same Digits Embedded Palprimes of Lengths 3, 5 and 7, Zenodo, August 8, 2020, pp. 1–315. doi:10.5281/zenodo.3977028 ↗
  3. Inder J. Taneja, 3 and 5-Digits Multiple Choice Embedded Palprimes, Zenodo, December 5, 2020, pp. 1–511. doi:10.5281/zenodo.4307875 ↗