I was factoring some large numbers this weekend, and I noticed a few primes that had very similar forms: 9901, 99990001, 999999000001, and 9999999900000001.  Essentially, these primes are the values produced by the formula (10^y - 1) x (10^y) + 1 for the following values of y: 2, 4, 6, and 8...

I was curious to know if there are any other values of y for which (10^y - 1) x (10^y) + 1 is prime.  I have since tested all values of y up to 550 and have found no further primes of this form.  I am starting to wonder if there are no others.  I find it odd that it works for all the even numbers between 1 and 9 and then nothing all the way up to 550.

If there are no other primes of this form, I'm sure a number theorist or accomplished mathematician would be able to explain why.  Any experts out there want to take a crack at this one?

I began to wonder if the number I'm raising to y somehow puts a limit on the value of y that will yield a prime... in this case the number is 10 and the only values of y that work (that I have found) are less than 10.  So I substituted a variable "b" for 10 in the formula making it: (b^y - 1) x (b^y) + 1.

Now I can try different values for b, and see if I get results that follow a pattern.  First I tried b=16 because it is bigger than 10.  For b=16 (testing all values of y up to 100), there are only two primes at y=1 (241), and y=8 (18446744069414584321).  So maybe b does limit the maximal value of y that yields a prime?  Next I tried b=5 (testing all values of y up to 100) and got these results:

y=2 (601)
y=4 (390001)
y=8 (152587500001)
y=18 (14551915228363037109375001)
y=48 (12621774483536188886587657044524576122057624161243438720703125000001)
y=64 (293873587705571876992184134305561419454666388650920794134435709565877914428710937500000001)

Interesting, but it also shoots down the "b is the maximal working value of y" idea.  However b may still be limiting the maximal working value of y in some way, it's just not obvious how, to me.

Just for the heck of it, I tested y up to 100 for all values of b between 1 and 16.  Here are the results:

((b^y - 1) x (b^y) + 1) is prime
y = 1..100, b = 1..16
b y
1 none
2 1, 2, 4, 32
3 1, 2, 4, 6, 12, 18
4 1, 2, 16
5 2, 4, 8, 18, 48, 64
6 1, 3, 4, 24, 32
7 1, 3, 6, 8, 9, 48
8 none
9 1, 2, 3, 6, 9
10 2, 4, 6, 8
11 6
12 2
13 1, 2, 4, 64
14 4, 6
15 1, 4, 9, 81
16 1, 8

I'm not at all surprised that for b=1 there are no results.  No matter what the value of y is, 1^y is still 1, and thus the formula always evaluates to (1 + 1) * (1) - 1 which equals 1, which is not a prime.

I find it intriguing how often powers of 2 show up (2, 4, 8, 16, 32, 64... all of these appear, some of them several times.)  Look at 15... all of the working values are squares.  Note that for 3 the values 6 (3x2), 12 (3x4), and 18 (3x6) all work.  I pushed on 3 all the way out to y=600 without finding any other working values.

Part of me intuits that simply because the set of integers is infinite, there must be other values of y that work when b is 10... but they may be awesomely large.  Another part of me intuits that there may be a simple rule at play which forces the number of working values of y to be finite based on the value of b as evidenced by the highly patternistic results I am seeing, and the fact that I have pushed out fairly far without finding anything else (after all (10^550-1)*(10^550)+1 is 1,099 digits long!)

I'm baffled. Can anyone help?


Edit: The Prime Curios website discusses primes of this form.  Apparently for b=10, all values of y up to 50,000 have been tested with no further primes found.  This implies that there is no rule known to the author of that site which limits primes of this form to just 9901, 99990001, 999999000001, and 9999999900000001.  Interesting.