Base 2: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1) * Case (1,1): ** 11 is prime, and thus the only minimal prime in this family. Base 3: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1), (1,2), (2,1), (2,2) * Case (1,1): ** Since 12, 21, 111 are primes, we only need to consider the family 1{0}1 (since any digits 1, 2 between them will produce smaller primes) *** All numbers of the form 1{0}1 are divisible by 2, thus cannot be prime. * Case (1,2): ** 12 is prime, and thus the only minimal prime in this family. * Case (2,1): ** 21 is prime, and thus the only minimal prime in this family. * Case (2,2): ** Since 21, 12 are primes, we only need to consider the family 2{0,2}2 (since any digits 1 between them will produce smaller primes) *** All numbers of the form 2{0,2}2 are divisible by 2, thus cannot be prime. Base 4: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1), (1,3), (2,1), (2,3), (3,1), (3,3) * Case (1,1): ** 11 is prime, and thus the only minimal prime in this family. * Case (1,3): ** 13 is prime, and thus the only minimal prime in this family. * Case (2,1): ** Since 23, 11, 31, 221 are primes, we only need to consider the family 2{0}1 (since any digits 1, 2, 3 between them will produce smaller primes) *** All numbers of the form 2{0}1 are divisible by 3, thus cannot be prime. * Case (2,3): ** 23 is prime, and thus the only minimal prime in this family. * Case (3,1): ** 31 is prime, and thus the only minimal prime in this family. * Case (3,3): ** Since 31, 13, 23 are primes, we only need to consider the family 3{0,3}3 (since any digits 1, 2 between them will produce smaller primes) *** All numbers of the form 3{0,3}3 are divisible by 3, thus cannot be prime. Base 5: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1), (1,2), (1,3), (1,4), (2,1), (2,2), (2,3), (2,4), (3,1), (3,2), (3,3), (3,4), (4,1), (4,2), (4,3), (4,4) * Case (1,1): ** Since 12, 21, 111, 131 are primes, we only need to consider the family 1{0,4}1 (since any digits 1, 2, 3 between them will produce smaller primes) *** All numbers of the form 1{0,4}1 are divisible by 2, thus cannot be prime. * Case (1,2): ** 12 is prime, and thus the only minimal prime in this family. * Case (1,3): ** Since 12, 23, 43, 133 are primes, we only need to consider the family 1{0,1}3 (since any digits 2, 3, 4 between them will produce smaller primes) *** Since 111 is prime, we only need to consider the families 1{0}3 and 1{0}1{0}3 (since any digit combo 11 between (1,3) will produce smaller primes) **** All numbers of the form 1{0}3 are divisible by 2, thus cannot be prime. **** For the 1{0}1{0}3 family, since 10103 is prime, we only need to consider the families 1{0}13 and 11{0}3 (since any digit combo 010 between (1,3) will produce smaller primes) ***** The smallest prime of the form 1{0}13 is 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013, which can be written as 109313 and equal the prime 5^95+8 ***** All numbers of the form 11{0}3 are divisible by 3, thus cannot be prime. * Case (1,4): ** Since 12, 34, 104 are primes, we only need to consider the families 1{1,4}4 (since any digits 0, 2, 3 between them will produce smaller primes) *** Since 111, 414 are primes, we only need to consider the family 1{4}4 and 11{4}4 (since any digit combo 11 or 41 between them will produce smaller primes) **** The smallest prime of the form 1{4}4 is 14444. **** All numbers of the form 11{4}4 are divisible by 2, thus cannot be prime. * Case (2,1): ** 21 is prime, and thus the only minimal prime in this family. * Case (2,2): ** Since 21, 23, 12, 32 are primes, we only need to consider the family 2{0,2,4}2 (since any digits 1, 3 between them will produce smaller primes) *** All numbers of the form 2{0,2,4}2 are divisible by 2, thus cannot be prime. * Case (2,3): ** 23 is prime, and thus the only minimal prime in this family. * Case (2,4): ** Since 21, 23, 34 are primes, we only need to consider the family 2{0,2,4}4 (since any digits 1, 3 between them will produce smaller primes) *** All numbers of the form 2{0,2,4}4 are divisible by 2, thus cannot be prime. * Case (3,1): ** Since 32, 34, 21 are primes, we only need to consider the family 3{0,1,3}1 (since any digits 2, 4 between them will produce smaller primes) *** Since 313, 111, 131, 3101 are primes, we only need to consider the families 3{0,3}1 and 3{0,3}11 (since any digit combo 10, 11, 13 between (3,1) will produce smaller primes) **** For the 3{0,3}1 family, we can separate this family to four families: ***** For the 30{0,3}01 family, we have the prime 30301, and the remain case is the family 30{0}01. ****** All numbers of the form 30{0}01 are divisible by 2, thus cannot be prime. ***** For the 30{0,3}31 family, note that there must be an even number of 3's between (30,31), or the result number will be divisible by 2 and cannot be prime. ****** Since 33331 is prime, any digit combo 33 between (30,31) will produce smaller primes. ******* Thus, the only possible prime is the smallest prime in the family 30{0}31, and this prime is 300031. ***** For the 33{0,3}01 family, note that there must be an even number of 3's between (33,01), or the result number will be divisible by 2 and cannot be prime. ****** Since 33331 is prime, any digit combo 33 between (33,01) will produce smaller primes. ******* Thus, the only possible prime is the smallest prime in the family 33{0}01, and this prime is 33001. ***** For the 33{0,3}31 family, we have the prime 33331, and the remain case is the family 33{0}31. ****** All numbers of the form 33{0}31 are divisible by 2, thus cannot be prime. * Case (3,2): ** 32 is prime, and thus the only minimal prime in this family. * Case (3,3): ** Since 32, 34, 23, 43, 313 are primes, we only need to consider the family 3{0,3}3 (since any digits 1, 2, 4 between them will produce smaller primes) *** All numbers of the form 3{0,3}3 are divisible by 3, thus cannot be prime. * Case (3,4): ** 34 is prime, and thus the only minimal prime in this family. * Case (4,1): ** Since 43, 21, 401 are primes, we only need to consider the family 4{1,4}1 (since any digits 0, 2, 3 between them will produce smaller primes) *** Since 414, 111 are primes, we only need to consider the family 4{4}1 and 4{4}11 (since any digit combo 14 or 11 between them will produce smaller primes) **** The smallest prime of the form 4{4}1 is 44441. **** All numbers of the form 4{4}11 are divisible by 2, thus cannot be prime. * Case (4,2): ** Since 43, 12, 32 are primes, we only need to consider the family 4{0,2,4}2 (since any digits 1, 3 between them will produce smaller primes) *** All numbers of the form 4{0,2,4}2 are divisible by 2, thus cannot be prime. * Case (4,3): ** 43 is prime, and thus the only minimal prime in this family. * Case (4,4): ** Since 43, 34, 414 are primes, we only need to consider the family 4{0,2,4}4 (since any digits 1, 3 between them will produce smaller primes) *** All numbers of the form 4{0,2,4}4 are divisible by 2, thus cannot be prime. Base 6: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1), (1,5), (2,1), (2,5), (3,1), (3,5), (4,1), (4,5), (5,1), (5,5) * Case (1,1): ** 11 is prime, and thus the only minimal prime in this family. * Case (1,5): ** 15 is prime, and thus the only minimal prime in this family. * Case (2,1): ** 21 is prime, and thus the only minimal prime in this family. * Case (2,5): ** 25 is prime, and thus the only minimal prime in this family. * Case (3,1): ** 31 is prime, and thus the only minimal prime in this family. * Case (3,5): ** 35 is prime, and thus the only minimal prime in this family. * Case (4,1): ** Since 45, 11, 21, 31, 51 are primes, we only need to consider the family 4{0,4}1 (since any digits 1, 2, 3, 5 between them will produce smaller primes) *** Since 4401 and 4441 are primes, we only need to consider the families 4{0}1 and 4{0}41 (since any digits combo 40 and 44 between them will produce smaller primes) **** All numbers of the form 4{0}1 are divisible by 5, thus cannot be prime. **** The smallest prime of the form 4{0}41 is 40041 * Case (4,5): ** 45 is prime, and thus the only minimal prime in this family. * Case (5,1): ** 51 is prime, and thus the only minimal prime in this family. * Case (5,5): ** Since 51, 15, 25, 35, 45 are primes, we only need to consider the family 5{0,5}5 (since any digits 1, 2, 3, 4 between them will produce smaller primes) *** All numbers of the form 5{0,5}5 are divisible by 5, thus cannot be prime. Base 8: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1), (1,3), (1,5), (1,7), (2,1), (2,3), (2,5), (2,7), (3,1), (3,3), (3,5), (3,7), (4,1), (4,3), (4,5), (4,7), (5,1), (5,3), (5,5), (5,7), (6,1), (6,3), (6,5), (6,7), (7,1), (7,3), (7,5), (7,7) * Case (1,1): ** Since 13, 15, 21, 51, 111, 141, 161 are primes, we only need to consider the family 1{0,7}1 (since any digits 1, 2, 3, 4, 5, 6 between them will produce smaller primes) *** Since 107, 177, 701 are primes, we only need to consider the number 171 and the family 1{0}1 (since any digits combo 07, 70, 77 between them will produce smaller primes) **** 171 is not prime. **** All numbers of the form 1{0}1 factored as 10^n+1 = (2^n+1) * (4^n-2^n+1), thus cannot be prime. * Case (1,3): ** 13 is prime, and thus the only minimal prime in this family. * Case (1,5): ** 15 is prime, and thus the only minimal prime in this family. * Case (1,7): ** Since 13, 15, 27, 37, 57, 107, 117, 147, 177 are primes, we only need to consider the family 1{6}7 (since any digits 0, 1, 2, 3, 4, 5, 7 between them will produce smaller primes) *** The smallest prime of the form 1{6}7 is 16667 (not minimal prime, since 667 is prime) * Case (2,1): ** 21 is prime, and thus the only minimal prime in this family. * Case (2,3): ** 23 is prime, and thus the only minimal prime in this family. * Case (2,5): ** Since 21, 23, 27, 15, 35, 45, 65, 75, 225, 255 are primes, we only need to consider the family 2{0}5 (since any digits 1, 2, 3, 4, 5, 6, 7 between them will produce smaller primes) *** All numbers of the form 2{0}5 are divisible by 7, thus cannot be prime. * Case (2,7): ** 27 is prime, and thus the only minimal prime in this family. * Case (3,1): ** Since 35, 37, 21, 51, 301, 361 are primes, we only need to consider the family 3{1,3,4}1 (since any digits 0, 2, 5, 6, 7 between them will produce smaller primes) *** Since 13, 343, 111, 131, 141, 431, 3331, 3411 are primes, we only need to consider the families 3{3}11, 33{1,4}1, 3{3,4}4{4}1 (since any digits combo 11, 13, 14, 33, 41, 43 between them will produce smaller primes) **** All numbers of the form 3{3}11 are divisible by 3, thus cannot be prime. **** For the 33{1,4}1 family, since 111 and 141 are primes, we only need to consider the families 33{4}1 and 33{4}11 (since any digits combo 11, 14 between them will produce smaller primes) ***** The smallest prime of the form 33{4}1 is 3344441 ***** All numbers of the form 33{4}11 are divisible by 301, thus cannot be prime. **** For the 3{3,4}4{4}1 family, since 3331 and 3344441 are primes, we only need to consider the families 3{4}1, 3{4}31, 3{4}341, 3{4}3441, 3{4}34441 (since any digits combo 33 or 34444 between (3,1) will produce smaller primes) ***** All numbers of the form 3{4}1 are divisible by 31, thus cannot be prime. ***** Since 4443 is prime, we only need to consider the numbers 3431, 34431, 34341, 344341, 343441, 3443441, 3434441, 34434441 (since any digit combo 444 between (3,3{4}1) will produce smaller primes) ****** None of 3431, 34431, 34341, 344341, 343441, 3443441, 3434441, 34434441 are primes. * Case (3,3): ** Since 35, 37, 13, 23, 53, 73, 343 are primes, we only need to consider the family 3{0,3,6}3 (since any digits 1, 2, 4, 5, 7 between them will produce smaller primes) *** All numbers of the form 3{0,3,6}3 are divisible by 3, thus cannot be prime. * Case (3,5): ** 35 is prime, and thus the only minimal prime in this family. * Case (3,7): ** 37 is prime, and thus the only minimal prime in this family. * Case (4,1): ** Since 45, 21, 51, 401, 431, 471 are primes, we only need to consider the family 4{1,4,6}1 (since any digits 0, 2, 3, 5, 7 between them will produce smaller primes) *** Since 111, 141, 161, 661, 4611 are primes, we only need to consider the families 4{4}11, 4{4,6}4{1,4,6}1, 4{4}6{4}1 (since any digits combo 11, 14, 16, 61, 66 between them will produce smaller primes) **** The smallest prime of the form 4{4}11 is 44444444444444411 (not minimal prime, since 444444441 is prime) **** For the 4{4,6}4{1,4,6}1 family, we can separate this family to 4{4,6}41, 4{4,6}411, 4{4,6}461 ***** For the 4{4,6}41 family, since 661 and 6441 are primes, we only need to consider the families 4{4}41 and 4{4}641 (since any digits combo 64 or 66 between (4,41) will produce smaller primes) ****** The smallest prime of the form 4{4}41 is 444444441 ****** The smallest prime of the form 4{4}641 is 444641 ***** For the 4{4,6}411 family, since 661 and 6441 are primes, we only need to consider the families 4{4}411 and 4{4}6411 (since any digits combo 64 or 66 between (4,411) will produce smaller primes) ****** The smallest prime of the form 4{4}411 is 444444441 ****** The smallest prime of the form 4{4}6411 is 4444444444444446411 (not minimal prime, since 444444441 and 444641 are primes) ***** For the 4{4,6}461 family, since 661 is prime, we only need to consider the family 4{4}461 ****** The smallest prime of the form 4{4}461 is 4444444461 (not minimal prime, since 444444441 is prime) **** For the 4{4}6{4}1 family, since 6441 is prime, we only need to consider the families 4{4}61 and 4{4}641 (since any digits combo 44 between (4{4}6,1) will produce smaller primes) ***** The smallest prime of the form 4{4}61 is 4444444461 (not minimal prime, since 444444441 is prime) ***** The smallest prime of the form 4{4}641 is 444641 * Case (4,3): ** Since 45, 13, 23, 53, 73, 433, 463 are primes, we only need to consider the family 4{0,4}3 (since any digits 1, 2, 3, 5, 6, 7 between them will produce smaller primes) *** Since 4043 and 4443 are primes, we only need to consider the families 4{0}3 and 44{0}3 (since any digits combo 04, 44 between them will produce smaller primes) **** All numbers of the form 4{0}3 are divisible by 7, thus cannot be prime. **** All numbers of the form 44{0}3 are divisible by 3, thus cannot be prime. * Case (4,5): ** 45 is prime, and thus the only minimal prime in this family. * Case (4,7): ** Since 45, 27, 37, 57, 407, 417, 467 are primes, we only need to consider the family 4{4,7}7 (since any digits 0, 1, 2, 3, 5, 6 between them will produce smaller primes) *** Since 747 is prime, we only need to consider the families 4{4}7, 4{4}77, 4{7}7, 44{7}7 (since any digits combo 74 between (4,7) will produce smaller primes) **** The smallest prime of the form 4{4}7 is 44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447, with 220 4's, which can be written as 42207 and equal the prime (2^665+17)/7 **** The smallest prime of the form 4{4}77 is 4444477 **** The smallest prime of the form 4{7}7 is 47777 **** The smallest prime of the form 44{7}7 is 4477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777, with 851 7's, which can be written as 447851 and equal the prime 37*2^2553-1 (not minimal prime, since 47777 is prime) * Case (5,1): ** 51 is prime, and thus the only minimal prime in this family. * Case (5,3): ** 53 is prime, and thus the only minimal prime in this family. * Case (5,5): ** Since 51, 53, 57, 15, 35, 45, 65, 75 are primes, we only need to consider the family 5{0,2,5}5 (since any digits 1, 3, 4, 6, 7 between them will produce smaller primes) *** Since 225, 255, 5205 are primes, we only need to consider the families 5{0,5}5 and 5{0,5}25 (since any digits combo 20, 22, 25 between them will produce smaller primes) **** All numbers of the form 5{0,5}5 are divisible by 5, thus cannot be prime. **** For the 5{0,5}25 family, since 500025 and 505525 are primes, we only need to consider the number 500525 the families 5{5}25, 5{5}025, 5{5}0025, 5{5}0525, 5{5}00525, 5{5}05025 (since any digits combo 000, 055 between (5,25) will produce smaller primes) ***** 500525 is not prime. ***** The smallest prime of the form 5{5}25 is 555555555555525 ***** The smallest prime of the form 5{5}025 is 55555025 ***** The smallest prime of the form 5{5}0025 is 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555550025 (not minimal prime, since 55555025 and 555555555555525 are primes) ***** The smallest prime of the form 5{5}0525 is 5550525 ***** The smallest prime of the form 5{5}00525 is 5500525 ***** The smallest prime of the form 5{5}05025 is 5555555555555555555555505025 (not minimal prime, since 5550525, 55555025, and 555555555555525 are primes) * Case (5,7): ** 57 is prime, and thus the only minimal prime in this family. * Case (6,1): ** Since 65, 21, 51, 631, 661 are primes, we only need to consider the family 6{0,1,4,7}1 (since any digits 2, 3, 5, 6 between them will produce smaller primes) *** Numbers containing 4: (note that the number cannot contain two or more 4's, or 6441 will be a subsequence) **** The form is 6{0,1,7}4{0,1,7}1 ***** Since 141, 401, 471 are primes, we only need to consider the family 6{0,7}4{1}1 ****** Since 111 is prime, we only need to consider the families 6{0,7}41 and 6{0,7}411 ******* For the 6{0,7}41 family, since 60741 is prime, we only need to consider the family 6{7}{0}41 ******** Since 6777 is prime, we only need to consider the families 6{0}41, 67{0}41, 677{0}41 ********* All numbers of the form 6{0}41 are divisible by 3, thus cannot be prime. ********* All numbers of the form 67{0}41 are divisible by 13, thus cannot be prime. ********* All numbers of the form 677{0}41 are divisible by 3, thus cannot be prime. ******* For the 6{0,7}411 family, since 60411 is prime, we only need to consider the family 6{7}411 ******** The smallest prime of the form 6{7}411 is 67777411 (not minimal prime, since 6777 is prime) *** Numbers not containing 4: **** The form is 6{0,1,7}1 ***** Since 111 is prime, we only need to consider the families 6{0,7}1 and 6{0,7}1{0,7}1 ****** All numbers of the form 6{0,7}1 are divisible by 7, thus cannot be prime. ****** For the 6{0,7}1{0,7}1 family, since 711 and 6101 are primes, we only need to consider the family 6{0}1{7}1 ******* Since 60171 is prime, we only need to consider the families 6{0}11 and 61{7}1 ******** All numbers of the form 6{0}11 are divisible by 3, thus cannot be prime. ******** The smallest prime of the form 61{7}1 is 617771 (not minimal prime, since 6777 is prime) * Case (6,3): ** Since 65, 13, 23, 53, 73, 643 are primes, we only need to consider the family 6{0,3,6}3 (since any digits 1, 2, 4, 5, 7 between them will produce smaller primes) *** All numbers of the form 6{0,3,6}3 are divisible by 3, thus cannot be prime. * Case (6,5): ** 65 is prime, and thus the only minimal prime in this family. * Case (6,7): ** Since 65, 27, 37, 57, 667 are primes, we only need to consider the family 6{0,1,4,7}7 (since any digits 2, 3, 5, 6 between them will produce smaller primes) *** Since 107, 117, 147, 177, 407, 417, 717, 747, 6007, 6477, 6707, 6777 are primes, we only need to consider the families 60{1,4,7}7, 6{0}17, 6{0,4}4{4}7, 6{0}77 (since any digits combo 00, 10, 11, 14, 17, 40, 41, 47, 70, 71, 74, 77 between them will produce smaller primes) **** All numbers of the form 6{0}17 or 6{0}77 are divisible by 3, thus cannot be prime. **** For the 60{1,4,7}7 family, since 117, 147, 177, 417, 6477, 717, 747, 6777 are primes, we only need to consider the numbers 6017, 6047, 6077 and the family 60{4}7 (since any digit combo 11, 14, 17, 41, 47, 71, 74, 77 between (60,7) will produce smaller primes) ***** None of 6017, 6047, 6077 are primes. **** All numbers of the form 60{4}7 are divisible by 21, thus cannot be prime. **** For the 6{0,4}4{4}7 family, since 6007 and 407 are primes, we only need to consider the families 6{4}7 and 60{4}7 (since any digit combo 00, 40 between (6,4{4}7) will produce smaller primes) ***** All numbers of the form 6{4}7 are divisible by 3, 5, or 15, thus cannot be prime. ***** All numbers of the form 60{4}7 are divisible by 21, thus cannot be prime. * Case (7,1): ** Since 73, 75, 21, 51, 701, 711 are primes, we only need to consider the family 7{4,6,7}1 (since any digits 0, 1, 2, 3, 5 between them will produce smaller primes) *** Since 747, 767, 471, 661, 7461, 7641 are primes, we only need to consider the families 7{4,7}4{4}1, 7{7}61, 7{7}7{4,6,7}1 (since any digits combo 46, 47, 64, 66, 67 between them will produce smaller primes) **** For the 7{4,7}4{4}1 family, since 747, 471 are primes, we only need to consider the family 7{7}{4}1 (since any digits combo 47 between (7,4{4}1) will produce smaller primes) ***** The smallest prime of the form 7{7}1 is 7777777777771 ***** The smallest prime of the form 7{7}41 is 777777777777777777777777777777777777777777777777777777777777777777777777777777741 (not minimal prime, since 7777777777771 is prime) ***** The smallest prime of the form 7{7}441 is 777777777777777777777777777777777777777777777777777777777777777777777777777777777777441 (not minimal prime, since 7777777777771 is prime) ***** The smallest prime of the form 7{7}4441 is 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774441 (not minimal prime, since 7777777777771 is prime) ***** The smallest prime of the form 7{7}44441 is 7777777777777777777777777777777777777777777777777777777744441 (not minimal prime, since 7777777777771 is prime) ***** All numbers of the form 7{7}444441 are divisible by 7, thus cannot be prime. ***** The smallest prime of the form 7{7}4444441 is 77774444441 ****** Since this prime has just 4 7's, we only need to consider the families with <=3 7's ******* The smallest prime of the form 7{4}1 is 744444441 ******* All numbers of the form 77{4}1 are divisible by 5, thus cannot be prime. ******* The smallest prime of the form 777{4}1 is 777444444444441 (not minimal prime, since 444444441 and 744444441 are primes) * Case (7,3): ** 73 is prime, and thus the only minimal prime in this family. * Case (7,5): ** 75 is prime, and thus the only minimal prime in this family. * Case (7,7): ** Since 73, 75, 27, 37, 57, 717, 747, 767 are primes, we only need to consider the family 7{0,7}7 (since any digits 1, 2, 3, 4, 5, 6 between them will produce smaller primes) *** All numbers of the form 7{0,7}7 are divisible by 7, thus cannot be prime. Base 10: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1), (1,3), (1,7), (1,9), (2,1), (2,3), (2,7), (2,9), (3,1), (3,3), (3,7), (3,9), (4,1), (4,3), (4,7), (4,9), (5,1), (5,3), (5,7), (5,9), (6,1), (6,3), (6,7), (6,9), (7,1), (7,3), (7,7), (7,9), (8,1), (8,3), (8,7), (8,9), (9,1), (9,3), (9,7), (9,9) * Case (1,1): ** 11 is prime, and thus the only minimal prime in this family. * Case (1,3): ** 13 is prime, and thus the only minimal prime in this family. * Case (1,7): ** 17 is prime, and thus the only minimal prime in this family. * Case (1,9): ** 19 is prime, and thus the only minimal prime in this family. * Case (2,1): ** Since 23, 29, 11, 31, 41, 61, 71, 251, 281 are primes, we only need to consider the family 2{0,2}1 (since any digits 1, 3, 4, 5, 6, 7, 8, 9 between them will produce smaller primes) *** Since 2221 and 20201 are primes, we only need to consider the families 2{0}1, 2{0}21, 22{0}1 (since any digits combo 22 or 020 between them will produce smaller primes) **** All numbers of the form 2{0}1 are divisible by 3, thus cannot be prime. **** The smallest prime of the form 2{0}21 is 20021 **** The smallest prime of the form 22{0}1 is 22000001 * Case (2,3): ** 23 is prime, and thus the only minimal prime in this family. * Case (2,7): ** Since 23, 29, 17, 37, 47, 67, 97 227, 257, 277 are primes, we only need to consider the family 2{0,8}7 (since any digits 1, 2, 3, 4, 5, 6, 7, 9 between them will produce smaller primes) *** Since 887 and 2087 are primes, we only need to consider the families 2{0}7 and 28{0}7 (since any digit combo 08 or 88 between them will produce smaller primes) **** All numbers of the form 2{0}7 are divisible by 3, thus cannot be prime. **** All numbers of the form 28{0}7 are divisible by 7, thus cannot be prime. * Case (2,9): ** 29 is prime, and thus the only minimal prime in this family. * Case (3,1): ** 31 is prime, and thus the only minimal prime in this family. * Case (3,3): ** Since 31, 37, 13, 23, 43, 53, 73, 83 are primes, we only need to consider the family 3{0,3,6,9}3 (since any digits 1, 2, 4, 5, 7, 8 between them will produce smaller primes) *** All numbers of the form 3{0,3,6,9}3 are divisible by 3, thus cannot be prime. * Case (3,7): ** 37 is prime, and thus the only minimal prime in this family. * Case (3,9): ** Since 31, 37, 19, 29, 59, 79, 89, 349 are primes, we only need to consider the family 3{0,3,6,9}9 (since any digits 1, 2, 4, 5, 7, 8 between them will produce smaller primes) *** All numbers of the form 3{0,3,6,9}9 are divisible by 3, thus cannot be prime. * Case (4,1): ** 41 is prime, and thus the only minimal prime in this family. * Case (4,3): ** 43 is prime, and thus the only minimal prime in this family. * Case (4,7): ** 47 is prime, and thus the only minimal prime in this family. * Case (4,9): ** Since 41, 43, 47, 19, 29, 59, 79, 89, 409, 449, 499 are primes, we only need to consider the family 4{6}9 (since any digits 0, 1, 2, 3, 4, 5, 7, 8, 9 between them will produce smaller primes) *** All numbers of the form 4{6}9 are divisible by 7, thus cannot be prime. * Case (5,1): ** Since 53, 59, 11, 31, 41, 61, 71, 521 are primes, we only need to consider the family 5{0,5,8}1 (since any digits 1, 2, 3, 4, 6, 7, 9 between them will produce smaller primes) *** Since 881 is prime, we only need to consider the families 5{0,5}1 and 5{0,5}8{0,5}1 (since any digit combo 88 between them will produce smaller primes) **** For the 5{0,5}1 family, since 5051 and 5501 are primes, we only need to consider the families 5{0}1 and 5{5}1 (since any digit combo 05 or 50 between them will produce smaller primes) ***** All numbers of the form 5{0}1 are divisible by 3, thus cannot be prime. ***** The smallest prime of the form 5{5}1 is 555555555551 **** For the 5{0,5}8{0,5}1 family, since 5081, 5581, 5801, 5851 are primes, we only need to consider the number 581 ***** 581 is not prime. * Case (5,3): ** 53 is prime, and thus the only minimal prime in this family. * Case (5,7): ** Since 53, 59, 17, 37, 47, 67, 97, 557, 577, 587 are primes, we only need to consider the family 5{0,2}7 (since any digits 1, 3, 4, 5, 6, 7, 8, 9 between them will produce smaller primes) *** Since 227 and 50207 are primes, we only need to consider the families 5{0}7, 5{0}27, 52{0}7 (since any digits combo 22 or 020 between them will produce smaller primes) **** All numbers of the form 5{0}7 are divisible by 3, thus cannot be prime. **** The smallest prime of the form 5{0}27 is 5000000000000000000000000000027 **** The smallest prime of the form 52{0}7 is 5200007 * Case (5,9): ** 59 is prime, and thus the only minimal prime in this family. * Case (6,1): ** 61 is prime, and thus the only minimal prime in this family. * Case (6,3): ** Since 61, 67, 13, 23, 43, 53, 73, 83 are primes, we only need to consider the family 6{0,3,6,9}3 (since any digits 1, 2, 4, 5, 7, 8 between them will produce smaller primes) *** All numbers of the form 6{0,3,6,9}3 are divisible by 3, thus cannot be prime. * Case (6,7): ** 67 is prime, and thus the only minimal prime in this family. * Case (6,9): ** Since 61, 67, 19, 29, 59, 79, 89 are primes, we only need to consider the family 6{0,3,4,6,9}9 (since any digits 1, 2, 5, 7, 8 between them will produce smaller primes) *** Since 449 is prime, we only need to consider the families 6{0,3,6,9}9 and 6{0,3,6,9}4{0,3,6,9}9 (since any digit combo 44 between them will produce smaller primes) **** All numbers of the form 6{0,3,6,9}9 are divisible by 3, thus cannot be prime. **** For the 6{0,3,6,9}4{0,3,6,9}9 family, since 409, 43, 6469, 499 are primes, we only need to consider the family 6{0,3,6,9}49 ***** Since 349, 6949 are primes, we only need to consider the family 6{0,6}49 ****** Since 60649 is prime, we only need to consider the family 6{6}{0}49 (since any digits combo 06 between {6,49} will produce smaller primes) ******* The smallest prime of the form 6{6}49 is 666649 ******** Since this prime has just 4 6's, we only need to consider the families with <=3 6's ********* The smallest prime of the form 6{0}49 is 60000049 ********* The smallest prime of the form 66{0}49 is 66000049 ********* The smallest prime of the form 666{0}49 is 66600049 * Case (7,1): ** 71 is prime, and thus the only minimal prime in this family. * Case (7,3): ** 73 is prime, and thus the only minimal prime in this family. * Case (7,7): ** Since 71, 73, 79, 17, 37, 47, 67, 97, 727, 757, 787 are primes, we only need to consider the family 7{0,7}7 (since any digits 1, 2, 3, 4, 5, 6, 8, 9 between them will produce smaller primes) *** All numbers of the form 7{0,7}7 are divisible by 7, thus cannot be prime. * Case (7,9): ** 79 is prime, and thus the only minimal prime in this family. * Case (8,1): ** Since 83, 89, 11, 31, 41, 61, 71, 821, 881 are primes, we only need to consider the family 8{0,5}1 (since any digits 1, 2, 3, 4, 6, 7, 8, 9 between them will produce smaller primes) *** Since 8501 is prime, we only need to consider the family 8{0}{5}1 (since any digits combo 50 between them will produce smaller primes) **** Since 80051 is prime, we only need to consider the families 8{0}1, 8{5}1, 80{5}1 (since any digits combo 005 between them will produce smaller primes) ***** All numbers of the form 8{0}1 are divisible by 3, thus cannot be prime. ***** The smallest prime of the form 8{5}1 is 8555555555555555555551 (not minimal prime, since 555555555551 is prime) ***** The smallest prime of the form 80{5}1 is 80555551 * Case (8,3): ** 83 is prime, and thus the only minimal prime in this family. * Case (8,7): ** Since 83, 89, 17, 37, 47, 67, 97, 827, 857, 877, 887 are primes, we only need to consider the family 8{0}7 (since any digits 1, 2, 3, 4, 5, 6, 7, 8, 9 between them will produce smaller primes) *** All numbers of the form 8{0}7 are divisible by 3, thus cannot be prime. * Case (8,9): ** 89 is prime, and thus the only minimal prime in this family. * Case (9,1): ** Since 97, 11, 31, 41, 61, 71, 991 are primes, we only need to consider the family 9{0,2,5,8}1 (since any digits 1, 3, 4, 6, 7, 9 between them will produce smaller primes) *** Since 251, 281, 521, 821, 881, 9001, 9221, 9551, 9851 are primes, we only need to consider the families 9{2,5,8}0{2,5,8}1, 9{0}2{0}1, 9{0}5{0,8}1, 9{0,5}8{0}1 (since any digits combo 00, 22, 25, 28, 52, 55, 82, 85, 88 between them will produce smaller primes) **** For the 9{2,5,8}0{2,5,8}1 family, since any digits combo 22, 25, 28, 52, 55, 82, 85, 88 between (9,1) will produce smaller primes, we only need to consider the numbers 901, 9021, 9051, 9081, 9201, 9501, 9801, 90581, 95081, 95801 ***** 95801 is the only prime among 901, 9021, 9051, 9081, 9201, 9501, 9801, 90581, 95081, 95801, but it is not minimal prime since 5801 is prime. **** For the 9{0}2{0}1 family, since 9001 is prime, we only need to consider the numbers 921, 9201, 9021 ***** None of 921, 9201, 9021 are primes. **** For the 9{0}5{0,8}1 family, since 9001 and 881 are primes, we only need to consider the numbers 951, 9051, 9501, 9581, 90581, 95081, 95801 ***** 95801 is the only prime among 951, 9051, 9501, 9581, 90581, 95081, 95801, but it is not minimal prime since 5801 is prime. **** For the 9{0,5}8{0}1 family, since 9001 and 5581 are primes, we only need to consider the numbers 981, 9081, 9581, 9801, 90581, 95081, 95801 ***** 95801 is the only prime among 981, 9081, 9581, 9801, 90581, 95081, 95801, but it is not minimal prime since 5801 is prime. * Case (9,3): ** Since 97, 13, 23, 43, 53, 73, 83 are primes, we only need to consider the family 9{0,3,6,9}3 (since any digits 1, 2, 4, 5, 7, 8 between them will produce smaller primes) *** All numbers of the form 9{0,3,6,9}3 are divisible by 3, thus cannot be prime. * Case (9,7): ** 97 is prime, and thus the only minimal prime in this family. * Case (9,9): ** Since 97, 19, 29, 59, 79, 89 are primes, we only need to consider the family 9{0,3,4,6,9}9 (since any digits 1, 2, 5, 7, 8 between them will produce smaller primes) *** Since 449 is prime, we only need to consider the families 9{0,3,6,9}9 and 9{0,3,6,9}4{0,3,6,9}9 (since any digit combo 44 between them will produce smaller primes) **** All numbers of the form 9{0,3,6,9}9 are divisible by 3, thus cannot be prime. **** For the 9{0,3,6,9}4{0,3,6,9}9 family, since 9049, 349, 9649, 9949 are primes, we only need to consider the family 94{0,3,6,9}9 ***** Since 409, 43, 499 are primes, we only need to consider the family 94{6}9 (since any digits 0, 3, 9 between (94,9) will produce smaller primes) ****** The smallest prime of the form 94{6}9 is 946669 Base 12: The possible (first digit,last digit) combo for a minimal prime with ≥3 digits are: (1,1), (1,5), (1,7), (1,B), (2,1), (2,5), (2,7), (2,B), (3,1), (3,5), (3,7), (3,B), (4,1), (4,5), (4,7), (4,B), (5,1), (5,5), (5,7), (5,B), (6,1), (6,5), (6,7), (6,B), (7,1), (7,5), (7,7), (7,B), (8,1), (8,5), (8,7), (8,B), (9,1), (9,5), (9,7), (9,B), (A,1), (A,5), (A,7), (A,B), (B,1), (B,5), (B,7), (B,B) * Case (1,1): ** 11 is prime, and thus the only minimal prime in this family. * Case (1,5): ** 15 is prime, and thus the only minimal prime in this family. * Case (1,7): ** 17 is prime, and thus the only minimal prime in this family. * Case (1,B): ** 1B is prime, and thus the only minimal prime in this family. * Case (2,1): ** Since 25, 27, 11, 31, 51, 61, 81, 91, 221, 241, 2A1, 2B1 are primes, we only need to consider the family 2{0}1 (since any digits 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B between them will produce smaller primes) *** The smallest prime of the form 2{0}1 is 2001 * Case (2,5): ** 25 is prime, and thus the only minimal prime in this family. * Case (2,7): ** 27 is prime, and thus the only minimal prime in this family. * Case (2,B): ** Since 25, 27, 1B, 3B, 4B, 5B, 6B, 8B, AB, 2BB are primes, we only need to consider the family 2{0,2,9}B (since any digits 1, 3, 4, 5, 6, 7, 8, A, B between them will produce smaller primes) *** Since 90B, 200B, 202B, 222B, 229B, 292B, 299B are primes, we only need to consider the numbers 20B, 22B, 29B, 209B, 220B (since any digits combo 00, 02, 22, 29, 90, 92, 99 between them will produce smaller primes) **** None of 20B, 22B, 29B, 209B, 220B are primes. * Case (3,1): ** 31 is prime, and thus the only minimal prime in this family. * Case (3,5): ** 35 is prime, and thus the only minimal prime in this family. * Case (3,7): ** 37 is prime, and thus the only minimal prime in this family. * Case (3,B): ** 3B is prime, and thus the only minimal prime in this family. * Case (4,1): ** Since 45, 4B, 11, 31, 51, 61, 81, 91, 401, 421, 471 are primes, we only need to consider the family 4{4,A}1 (since any digit 0, 1, 2, 3, 5, 6, 7, 8, 9, B between them will produce smaller primes) *** Since A41 and 4441 are primes, we only need to consider the families 4{A}1 and 44{A}1 (since any digit combo 44, A4 between them will produce smaller primes) **** All numbers of the form 4{A}1 are divisible by 5, thus cannot be prime. **** The smallest prime of the form 44{A}1 is 44AAA1 * Case (4,5): ** 45 is prime, and thus the only minimal prime in this family. * Case (4,7): ** Since 45, 4B, 17, 27, 37, 57, 67, 87, A7, B7, 447, 497 are primes, we only need to consider the family 4{0,7}7 (since any digit 1, 2, 3, 4, 5, 6, 8, 9, A, B between them will produce smaller primes) *** Since 4707 and 4777 are primes, we only need to consider the families 4{0}7 and 4{0}77 (since any digit combo 70, 77 between them will produce smaller primes) **** All numbers of the form 4{0}7 are divisible by B, thus cannot be prime. **** The smallest prime of the form 4{0}77 is 400000000000000000000000000000000000000077 * Case (4,B): ** 4B is prime, and thus the only minimal prime in this family. * Case (5,1): ** 51 is prime, and thus the only minimal prime in this family. * Case (5,5): ** Since 51, 57, 5B, 15, 25, 35, 45, 75, 85, 95, B5, 565 are primes, we only need to consider the family 5{0,5,A}5 (since any digits 1, 2, 3, 4, 6, 7, 8, 9, B between them will produce smaller primes) *** All numbers of the form 5{0,5,A}5 are divisible by 5, thus cannot be prime. * Case (5,7): ** 57 is prime, and thus the only minimal prime in this family. * Case (5,B): ** 5B is prime, and thus the only minimal prime in this family. * Case (6,1): ** 61 is prime, and thus the only minimal prime in this family. * Case (6,5): ** Since 61, 67, 6B, 15, 25, 35, 45, 75, 85, 95, B5, 655, 665 are primes, we only need to consider the family 6{0,A}5 (since any digits 1, 2, 3, 4, 5, 6, 7, 8, 9, B between them will produce smaller primes) *** Since 6A05 and 6AA5 are primes, we only need to consider the families 6{0}5 and 6{0}A5 (since any digit combo A0, AA between them will produce smaller primes) **** All numbers of the form 6{0}5 are divisible by B, thus cannot be prime. **** The smallest prime of the form 6{0}A5 is 600A5 * Case (6,7): ** 67 is prime, and thus the only minimal prime in this family. * Case (6,B): ** 6B is prime, and thus the only minimal prime in this family. * Case (7,1): ** Since 75, 11, 31, 51, 61, 81, 91, 701, 721, 771, 7A1 are primes, we only need to consider the family 7{4,B}1 (since any digits 0, 1, 2, 3, 5, 6, 7, 8, 9, A between them will produce smaller primes) *** Since 7BB, 7441 and 7B41 are primes, we only need to consider the numbers 741, 7B1, 74B1 **** None of 741, 7B1, 74B1 are primes. * Case (7,5): ** 75 is prime, and thus the only minimal prime in this family. * Case (7,7): ** Since 75, 17, 27, 37, 57, 67, 87, A7, B7, 747, 797 are primes, we only need to consider the family 7{0,7}7 (since any digits 1, 2, 3, 4, 5, 6, 8, 9, A, B between them will produce smaller primes) *** All numbers of the form 7{0,7}7 are divisible by 7, thus cannot be prime. * Case (7,B): ** Since 75, 1B, 3B, 4B, 5B, 6B, 8B, AB, 70B, 77B, 7BB are primes, we only need to consider the family 7{2,9}B (since any digits 0, 1, 3, 4, 5, 6, 7, 8, A, B between them will produce smaller primes) *** Since 222B, 729B is prime, we only need to consider the families 7{9}B, 7{9}2B, 7{9}22B (since any digits combo 222, 29 between them will produce smaller primes) **** The smallest prime of the form 7{9}B is 7999B **** The smallest prime of the form 7{9}2B is 79992B (not minimal prime, since 992B and 7999B are primes) **** The smallest prime of the form 7{9}22B is 79922B (not minimal prime, since 992B is prime) * Case (8,1): ** 81 is prime, and thus the only minimal prime in this family. * Case (8,5): ** 85 is prime, and thus the only minimal prime in this family. * Case (8,7): ** 87 is prime, and thus the only minimal prime in this family. * Case (8,B): ** 8B is prime, and thus the only minimal prime in this family. * Case (9,1): ** 91 is prime, and thus the only minimal prime in this family. * Case (9,5): ** 95 is prime, and thus the only minimal prime in this family. * Case (9,7): ** Since 91, 95, 17, 27, 37, 57, 67, 87, A7, B7, 907 are primes, we only need to consider the family 9{4,7,9}7 (since any digit 0, 1, 2, 3, 5, 6, 8, A, B between them will produce smaller primes) *** Since 447, 497, 747, 797, 9777, 9947, 9997 are primes, we only need to consider the numbers 947, 977, 997, 9477, 9977 (since any digits combo 44, 49, 74, 77, 79, 94, 99 between them will produce smaller primes) **** None of 947, 977, 997, 9477, 9977 are primes. * Case (9,B): ** Since 91, 95, 1B, 3B, 4B, 5B, 6B, 8B, AB, 90B, 9BB are primes, we only need to consider the family 9{2,7,9}B (since any digit 0, 1, 3, 4, 5, 6, 8, A, B between them will produce smaller primes) *** Since 27, 77B, 929B, 992B, 997B are primes, we only need to consider the families 9{2,7}2{2}B, 97{2,9}B, 9{7,9}9{9}B (since any digits combo 27, 29, 77, 92, 97 between them will produce smaller primes) **** For the 9{2,7}2{2}B family, since 27 and 77B are primes, we only need to consider the families 9{2}2{2}B and 97{2}2{2}B (since any digits combo 27, 77 between (9,2{2}B) will produce smaller primes) ***** The smallest prime of the form 9{2}2{2}B is 9222B (not minimal prime, since 222B is prime) ***** The smallest prime of the form 97{2}2{2}B is 9722222222222B (not minimal prime, since 222B is prime) **** For the 97{2,9}B family, since 729B and 929B are primes, we only need to consider the family 97{9}{2}B (since any digits combo 29 between (97,B) will produce smaller primes) ***** Since 222B is prime, we only need to consider the families 97{9}B, 97{9}2B, 97{9}22B (since any digit combo 222 between (97,B) will produce smaller primes) ****** All numbers of the form 97{9}B are divisible by 11, thus cannot be prime. ****** The smallest prime of the form 97{9}2B is 979999992B (not minimal prime, since 9999B is prime) ****** All numbers of the form 97{9}22B are divisible by 11, thus cannot be prime. **** For the 9{7,9}9{9}B family, since 77B and 9999B are primes, we only need to consider the numbers 99B, 999B, 979B, 9799B, 9979B ***** None of 99B, 999B, 979B, 9799B, 9979B are primes. * Case (A,1): ** Since A7, AB, 11, 31, 51, 61, 81, 91, A41 are primes, we only need to consider the family A{0,2,A}1 (since any digits 1, 3, 4, 5, 6, 7, 8, 9, B between them will produce smaller primes) *** Since 221, 2A1, A0A1, A201 are primes, we only need to consider the families A{A}{0}1 and A{A}{0}21 (since any digits combo 0A, 20, 22, 2A between them will produce smaller primes) **** For the A{A}{0}1 family: ***** All numbers of the form A{0}1 are divisible by B, thus cannot be prime. ***** The smallest prime of the form AA{0}1 is AA000001 ***** The smallest prime of the form AAA{0}1 is AAA0001 ***** The smallest prime of the form AAAA{0}1 is AAAA1 ****** Since this prime has no 0's, we do not need to consider the families {A}1, {A}01, {A}001, etc. **** All numbers of the form A{A}{0}21 are divisible by 5, thus cannot be prime. * Case (A,5): ** Since A7, AB, 15, 25, 35, 45, 75, 85, 95, B5 are primes, we only need to consider the family A{0,5,6,A}5 (since any digits 1, 2, 3, 4, 7, 8, 9, B between them will produce smaller primes) *** Since 565, 655, 665, A605, A6A5, AA65 are primes, we only need to consider the families A{0,5,A}5 and A{0}65 (since any digits combo 56, 60, 65, 66, 6A, A6 between them will produce smaller primes) **** All numbers of the form A{0,5,A}5 are divisible by 5, thus cannot be prime. **** The smallest prime of the form A{0}65 is A00065 * Case (A,7): ** A7 is prime, and thus the only minimal prime in this family. * Case (A,B): ** AB is prime, and thus the only minimal prime in this family. * Case (B,1): ** Since B5, B7, 11, 31, 51, 61, 81, 91, B21 are primes, we only need to consider the family B{0,4,A,B}1 (since any digits 1, 2, 3, 5, 6, 7, 8, 9 between them will produce smaller primes) *** Since 4B, AB, 401, A41, B001, B0B1, BB01, BB41 are primes, we only need to consider the families B{A}0{4,A}1, B{0,4}4{4,A}1, B{0,4,A,B}A{0,A}1, B{B}B{A,B}1 (since any digits combo 00, 0B, 40, 4B, A4, AB, B0, B4 between them will produce smaller primes) **** For the B{A}0{4,A}1 family, since A41 is prime, we only need consider the families B0{4}{A}1 and B{A}0{A}1 ***** For the B0{4}{A}1 family, since B04A1 is prime, we only need to consider the families B0{4}1 and B0{A}1 ****** The smallest prime of the form B0{4}1 is B04441 (not minimal prime, since 4441 is prime) ****** The smallest prime of the form B0{A}1 is B0AAAAA1 (not minimal prime, since AAAA1 is prime) ***** For the B{A}0{A}1 family, since A0A1 is prime, we only need to consider the families B{A}01 and B0{A}1 ****** The smallest prime of the form B{A}01 is BAA01 ****** The smallest prime of the form B0{A}1 is B0AAAAA1 (not minimal prime, since AAAA1 is prime) **** For the B{0,4}4{4,A}1 family, since 4441 is prime, we only need to consider the families B{0}4{4,A}1 and B{0,4}4{A}1 ***** For the B{0}4{4,A}1 family, since B001 is prime, we only need to consider the families B4{4,A}1 and B04{4,A}1 ****** For the B4{4,A}1 family, since A41 is prime, we only need to consider the family B4{4}{A}1 ******* Since 4441 and BAAA1 are primes, we only need to consider the numbers B41, B441, B4A1, B44A1, B4AA1, B44AA1 ******** None of B41, B441, B4A1, B44A1, B4AA1, B44AA1 are primes. ****** For the B04{4,A}1 family, since B04A1 is prime, we only need to consider the family B04{4}1 ******* The smallest prime of the form B04{4}1 is B04441 (not minimal prime, since 4441 is prime) ***** For the B{0,4}4{A}1 family, since 401, 4441, B001 are primes, we only need to consider the families B4{A}1, B04{A}1, B44{A}1, B044{A}1 (since any digits combo 00, 40, 44 between (B,4{A}1) will produce smaller primes) ****** The smallest prime of the form B4{A}1 is B4AAA1 (not minimal prime, since BAAA1 is prime) ****** The smallest prime of the form B04{A}1 is B04A1 ****** The smallest prime of the form B44{A}1 is B44AAAAAAA1 (not minimal prime, since BAAA1 is prime) ****** The smallest prime of the form B044{A}1 is B044A1 (not minimal prime, since B04A1 is prime) **** For the B{0,4,A,B}A{0,A}1 family, since all numbers in this family with 0 between (B,1) are in the B{A}0{4,A}1 family, and all numbers in this family with 4 between (B,1) are in the B{0,4}4{4,A}1 family, we only need to consider the family B{A,B}A{A}1 ***** Since BAAA1 is prime, we only need to consider the families B{A,B}A1 and B{A,B}AA1 ****** For the B{A,B}A1 family, since AB and BAAA1 are primes, we only need to consider the families B{B}A1 and B{B}AA1 ******* All numbers of the form B{B}A1 are divisible by B, thus cannot be prime. ******* The smallest prime of the form B{B}AA1 is BBBAA1 ****** For the B{A,B}AA1 family, since BAAA1 is prime, we only need to consider the families B{B}AA1 ******* The smallest prime of the form B{B}AA1 is BBBAA1 **** For the B{B}B{A,B}1 family, since AB and BAAA1 are primes, we only need to consider the families B{B}B1, B{B}BA1, B{B}BAA1 (since any digits combo AB or AAA between (B{B}B,1) will produce smaller primes) ***** The smallest prime of the form B{B}B1 is BBBB1 ***** All numbers of the form B{B}BA1 are divisible by B, thus cannot be prime. ***** The smallest prime of the form B{B}BAA1 is BBBAA1 * Case (B,5): ** B5 is prime, and thus the only minimal prime in this family. * Case (B,7): ** B7 is prime, and thus the only minimal prime in this family. * Case (B,B): ** Since B5, B7, 1B, 3B, 4B, 5B, 6B, 8B, AB, B2B are primes, we only need to consider the family B{0,9,B}B (since any digits 1, 2, 3, 4, 5, 6, 7, 8, A between them will produce smaller primes) *** Since 90B and 9BB are primes, we only need to consider the families B{0,B}{9}B **** Since 9999B is prime, we only need to consider the families B{0,B}B, B{0,B}9B, B{0,B}99B, B{0,B}999B ***** All numbers of the form B{0,B}B are divisible by B, thus cannot be prime. ***** For the B{0,B}9B family: ****** Since B0B9B and BB09B are primes, we only need to consider the families B{0}9B and B{B}9B (since any digits combo 0B, B0 between (B,9B) will produce smaller primes) ******* The smallest prime of the form B{0}9B is B0000000000000000000000000009B ******* All numbers of the from B{B}9B is either divisible by 11 (if totally number of B's is even) or factored as 10^(2*n)-21 = (10^n-5) * (10^n+5) (if totally number of B's is odd number 2*n-1), thus cannot be prime. ***** For the B{0,B}99B family: ****** Since B0B9B and BB09B are primes, we only need to consider the families B{0}99B and B{B}99B (since any digits combo 0B, B0 between (B,99B) will produce smaller primes) ******* The smallest prime of the form B{0}99B is B00099B ******* The smallest prime of the form B{B}99B is BBBBBB99B ***** For the B{0,B}999B family: ****** Since B0B9B and BB09B are primes, we only need to consider the families B{0}999B and B{B}999B (since any digits combo 0B, B0 between (B,999B) will produce smaller primes) ******* The smallest prime of the form B{0}999B is B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000999B (not minimal prime, since B00099B and B0000000000000000000000000009B are primes) ******* The smallest prime of the form B{B}999B is BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB999B (not minimal prime, since BBBBBB99B is prime)