Almost Repunit Primes

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

A repunit is a number using only one digit. The numbers 11 and 1111111111111111111 are examples of repunit primes. The number of ones in such a repunit primes can be 2, 19, 23, 317, 1031, 49081, 86453, or 109297.


An almost repunit number repeats a digit but one digit is different, for example, 222222922. The primes of this form make interesting patterns, as shown in this Demonstration. Whether there is any pattern to these is an unsolved problem.


Contributed by: Ed Pegg Jr (March 2011)
Open content licensed under CC BY-NC-SA




Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.