10-15-2005, 12:32 AM
I have the answer, without much time spent either: there can be only one.
Why? Well, think about it:
4 (perfect square) - 1 = 3 (prime)
9 (perfect square) - 1 = 8 (not prime)
16 (perfect square) - 1 = 15 (not prime)
25 (perfect square) - 1 = 24 (not prime)
36 (perfect square) - 1 = 35 (not prime)
49 (perfect square) - 1 = 48 (not prime)
64 (perfect square) - 1 = 63 (not prime)
Do you see a pattern here? The results increment like this:
a(n) = a(n-1) + (a(n-1) - a(n-2)) + 2
This means that the current result is found by adding to the difference between the previous two results. In other words:
8 + (8 - 3) + 2 = 8 + (5) + 2 = 15
15 + (15 - 8) + 2 = 15 + (7) + 2 = 24
24 + (24 - 15) + 2 = 24 + (9) + 2 = 35
Note the increments shown in parentheses. They have a difference of 2 (because of the +2 at the end).
A little math lesson for people who hate it.
Because this keeps happening (and rendering non-prime numbers), the only possible prime number that fits your criterion is the number 3.
Why? Well, think about it:
4 (perfect square) - 1 = 3 (prime)
9 (perfect square) - 1 = 8 (not prime)
16 (perfect square) - 1 = 15 (not prime)
25 (perfect square) - 1 = 24 (not prime)
36 (perfect square) - 1 = 35 (not prime)
49 (perfect square) - 1 = 48 (not prime)
64 (perfect square) - 1 = 63 (not prime)
Do you see a pattern here? The results increment like this:
a(n) = a(n-1) + (a(n-1) - a(n-2)) + 2
This means that the current result is found by adding to the difference between the previous two results. In other words:
8 + (8 - 3) + 2 = 8 + (5) + 2 = 15
15 + (15 - 8) + 2 = 15 + (7) + 2 = 24
24 + (24 - 15) + 2 = 24 + (9) + 2 = 35
Note the increments shown in parentheses. They have a difference of 2 (because of the +2 at the end).
A little math lesson for people who hate it.
Because this keeps happening (and rendering non-prime numbers), the only possible prime number that fits your criterion is the number 3.
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)