All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Repunits and bases (Posted on 2013-07-24)
112=3 and 1113=13 are prime. However, 11114=85=5*17 and 111115=781=11*71 are not prime. What is the least number n>3 such that the repunit consisting of n 1's in base n is prime?

 See The Solution Submitted by Math Man No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 Answer: | Comment 1 of 6

The general formula is x=(n^n-1)/(n-1), which gives a base 10 value that can quickly be checked for primality. Obviously, only prime n need be checked. Using this method,

{{n == 2, x == 3}

{n == 3, x == 13}

{n == 5, x == 781}

{n == 7, x == 137257}

{n == 11, x == 28531167061}

{n == 13, x == 25239592216021}

{n == 17, x == 51702516367896047761}

{n == 19, x == 109912203092239643840221}...}

109912203092239643840221 is prime, and in base 19 is:

1111111111111111111.

Edited on July 24, 2013, 11:45 am
 Posted by broll on 2013-07-24 11:29:46

 Search: Search body:
Forums (0)