## Siamese Primes: n2 -2 & n2 +2

#### This is an example of how prime number patterns can be deciphered using the Prime Spiral Sieve as an analytical tool; in this case Siamese Primes.

Given the fact that all potential prime numbers (p) > 5 are p ≡ 1, 7, 11, 13, 17, 19, 23 or 29 (modulo 30) [dubbed "prime roots," for convenience], one need simply test all odd numbers in the intervals between the prime roots (3, 5, 9, 15, 21, 25 and 27) against the formula for Siamese Primes (n2 -2 & n2 +2), and in turn test these results modulo 30 to see which ones possess prime roots, i.e., are potentially prime. Computing accordingly, the following numbers test positive for prime roots:

n ≡ 3 (modulo 30) (generates mod30, 7 & 11)
n ≡ 9 (modulo 30) (generates mod30, 19 & 23)
n ≡ 15 (modulo 30) (generates mod30, 13 & 17)
n ≡ 21 (modulo 30) (generates mod30, 19 & 23)
n ≡ 27 (modulo 30) (generates mod30, 7 & 11)

Reconfiguring the above into a number sequence for potential values of n we get: 3 {+6+6+6+6+6} {repeat ... ∞} or, simplifying, 6n+3. The matrix below lists the first 40 integers in the sequence:

### Values for n = Potential Generators of Siamese Primes

 3 +6 9 +6 15 +6 21 +6 27 +6 33 +6 39 +6 45 +6 51 +6 57 +6 63 +6 69 +6 75 +6 81 +6 87 +6 93 +6 99 +6 105 +6 111 +6 117 +6 123 +6 129 +6 135 +6 141 +6 147 +6 153 +6 159 +6 165 +6 171 +6 177 +6 183 +6 189 +6 195 +6 201 +6 207 +6 213 +6 219 +6 225 +6 231 +6 237 +6

In the knowledge that all potential prime numbers stair-step in intervals of 30, one need simply take each root value for n (3, 9, 15, 21 & 27) and repeatedly add 30 (i.e., n + 30; n + 60; n + 90 ...) then test the results for primality as shown in the matrix below, or, alternatively, starting with n = 0 test every 6n+3, as sequenced in the matrix above. Doing so yields results consistent with all n2 -2 & n2 +2 = Siamese Primes listed by the OEIS Foundation, with values of n ranging from 3 to 4305. [Note: Of these the author contributed n = 3621; n = 3807; and n = 4305, which he found readily employing this method.] Also shown below are the modulo 30 results for all the Siamese Prime pairs themselves.

 Root 3 n n2 n2 -2 Prime? mod30 n2 +2 Prime? mod30 Siamese? n = 3 3 9 7 yes 7 11 yes 11 Yes n +30 33 1089 1087 yes 7 1091 yes 11 Yes +30 63 3969 3967 yes 7 3971 no 11 No +30 93 8649 8647 yes 7 8651 no 11 No +30 123 15129 15127 no 7 15131 yes 11 No test +30...n ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ 273 74529 74527 yes 7 74531 yes 11 Yes ↓ 303 91809 91807 yes 7 91811 yes 11 Yes ↓ 513 263169 263167 yes 7 263171 yes 11 Yes ↓ 573 328329 328327 yes 7 328331 yes 11 Yes ↓ 1113 1238769 1238767 yes 7 1238771 yes 11 Yes ↓ 1143 1306449 1306447 yes 7 1306451 yes 11 Yes ↓ 1233 1520289 1520287 yes 7 1520291 yes 11 Yes ↓ 1563 2442969 2442967 yes 7 2442971 yes 11 Yes ↓ 1953 3814209 3814207 yes 7 3814211 yes 11 Yes ↓ 2133 4549689 4549687 yes 7 4549691 yes 11 Yes ↓ 2283 5212089 5212087 yes 7 5212091 yes 11 Yes ↓ 3093 9566649 9566647 yes 7 9566651 yes 11 Yes ↓ 3453 11923209 11923207 yes 7 11923211 yes 11 Yes

 Root 9 n n2 n2 -2 Prime? mod30 n2 +2 Prime? mod30 Siamese? n = 9 9 81 79 yes 19 83 yes 23 Yes n +30 39 1521 1519 no 19 1523 yes 23 No +30 69 4761 4759 yes 19 4763 no 23 No +30 99 9801 9799 no 19 9803 yes 23 No +30 129 16641 16639 no 19 16643 no 23 No test +30...n ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ 309 95481 95479 yes 19 95483 yes 23 Yes ↓ 429 184041 184039 yes 19 184043 yes 23 Yes ↓ 609 370881 370879 yes 19 370883 yes 23 Yes ↓ 1239 1535121 1535119 yes 19 1535123 yes 23 Yes ↓ 1749 3059001 3058999 yes 19 3059003 yes 23 Yes ↓ 1839 3381921 3381919 yes 19 3381923 yes 23 Yes ↓ 2589 6702921 6702919 yes 19 6702923 yes 23 Yes ↓ 3549 12595401 12595399 yes 19 12595403 yes 23 Yes

 Root 15 n n2 n2 -2 Prime? mod30 n2 +2 Prime? mod30 Siamese? n = 15 15 225 223 yes 13 227 yes 17 Yes n +30 45 2025 2023 no 13 2027 yes 17 No +30 75 5625 5623 yes 13 5627 no 17 No +30 105 11025 11023 no 13 11027 yes 17 No +30 135 18225 18223 yes 13 18227 no 17 No test +30...n ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ 1035 1071225 1071223 yes 13 1071227 yes 17 Yes ↓ 2715 7371225 7371223 yes 13 7371227 yes 17 Yes ↓ 2955 8732025 8732023 yes 13 8732027 yes 17 Yes ↓ 3555 12638025 12638023 yes 13 12638027 yes 17 Yes ↓ 4305 18533025 18533023 yes 13 18533027 yes 17 Yes

 Root 21 n n2 n2 -2 Prime? mod30 n2 +2 Prime? mod30 Siamese? n = 21 21 441 439 yes 19 443 yes 23 Yes n +30 51 2601 2599 no 19 2603 no 23 No +30 81 6561 6559 no 19 6563 yes 23 No +30 111 12321 12319 no 19 12323 yes 23 No +30 141 19881 19879 no 19 19883 no 23 No test +30...n ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ 441 194481 194479 yes 19 194483 yes 23 Yes ↓ 561 314721 314719 yes 19 314723 yes 23 Yes ↓ 1071 1147041 1147039 yes 19 1147043 yes 23 Yes ↓ 1311 1718721 1718719 yes 19 1718723 yes 23 Yes ↓ 1611 2595321 2595319 yes 19 2595323 yes 23 Yes ↓ 2211 4888521 4888519 yes 19 4888523 yes 23 Yes ↓ 2721 7403841 7403839 yes 19 7403843 yes 23 Yes ↓ 3081 9492561 9492559 yes 19 9492563 yes 23 Yes ↓ 3621 13111641 13111639 yes 19 13111643 yes 23 Yes

 Root 27 n n2 n2 -2 Prime? mod30 n2 +2 Prime? mod30 Siamese? n = 27 27 729 727 yes 7 731 no 11 No n +30 57 3249 3247 yes 7 3251 no 11 No +30 87 7569 7567 no 7 7571 no 11 No +30 117 13689 13687 no 7 13691 yes 11 No +30 147 21609 21607 no 7 21611 yes 11 No test +30...n ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ 237 56169 56167 yes 7 56171 yes 11 Yes ↓ 387 149769 149767 yes 7 149771 yes 11 Yes ↓ 447 199809 199807 yes 7 199811 yes 11 Yes ↓ 807 651249 651247 yes 7 651251 yes 11 Yes ↓ 897 804609 804607 yes 7 804611 yes 11 Yes ↓ 1617 2614689 2614687 yes 7 2614691 yes 11 Yes ↓ 1737 3017169 3017167 yes 7 3017171 yes 11 Yes ↓ 1827 3337929 3337927 yes 7 3337931 yes 11 Yes ↓ 3807 14493249 14493247 yes 7 14493251 yes 11 Yes