Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Why is it that $$7 = 10-3$$ $$77 = 10^2-23$$ $$777 = 10^3- 223$$ It seems that $3,23,223, \dots$ are all prime numbers. Is there any special reason for this?

share|improve this question
5  
the strong law of small numbers –  pedja Nov 19 '11 at 3:14

2 Answers 2

Primality testing for the first 1000 elements using Mathematica:

Tally[PrimeQ/@Table[ToExpression@StringJoin[{Array["2" &, {i}], {"3"}}], 
                   {i, 0, 1000}]]

{{True, 13}, {False, 987}}

The number of digits of those primes are:

{1, 2, 3, 8, 11, 36, 95, 101, 128, 260, 351, 467, 645}

Edit

Primes get sparse as you go on. For the first 2000 elements:

{{True, 16}, {False, 1984}}

The number of digits of those primes are:

{1, 2, 3, 8, 11, 36, 95, 101, 128, 260, 351, 467, 645, 1011, 1178, 1217}

Plotting occurrence number vs. number of digits on a Log scale:

ListLogPlot[Flatten@Position[b, True], InterpolationOrder -> 3, 
            Joined -> True, Mesh -> Full]

enter image description here

share|improve this answer
1  
Wow, I got eleven out of thirteen? :D –  J. M. Nov 19 '11 at 16:15

No. $7777=10^4-2223$, and $2223=3\cdot 741$ is not prime. More generally, $$10^n=\underset{n}{\underbrace{7\dots 7}}+\underset{n-1}{\underbrace{2\dots 2}}3\;,$$ and if $n-1$ is a multiple of $3$, then $$\underset{n-1}{\underbrace{2\dots 2}}3$$ is guaranteed to be a multiple of $3$. Thus, $$\underset{n-1}{\underbrace{2\dots 2}}3$$ is composite for $n=4,7,10,13,\dots$.

share|improve this answer
2  
For $n \leq 400$, the only prime values are $n=1, 2, 3, 8, 11, 36, 95, 101, 128, 260, 351, \dots$; not that many primes, I'd say. –  J. M. Nov 19 '11 at 3:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.