In base-N, there are three distinct 3-digit primes such that when they are concatenated (
in any order) the resulting 9-digit base-N number is also prime.
Find the smallest base N where a solution exists, the three 3-digit primes, the six 9-digit base-N concatenations, and their base 10 equivalents.
The smallest such base is 5, as shown as the first entry in the table below.
base-5 decimal
221342304 965329
342304221 1525561
304221342 1242097
221304342 963097
342221304 1523329
304342221 1246561
The three 3-digit primes are 221, 342, 304 or 61, 97, 79 in decimal.
The table shows through base-12:
sample decimal versions
9-digit
base prime whole 3-digit parts
5 221342304 965329 61 97 79
6 111245215 2028107 43 101 83
6 251455411 4844383 103 179 151
9 102771122 44569703 83 631 101
9 108771537 47758687 89 631 439
9 128454201 57136267 107 373 163
9 151728322 67925567 127 593 263
9 164504272 74168687 139 409 227
9 177375241 80474509 151 311 199
9 177847375 80751641 151 691 311
9 201814737 87107353 163 661 601
9 221755744 96641221 181 617 607
9 267531414 118827337 223 433 337
9 274564454 122037889 229 463 373
9 315755331 137030401 257 617 271
9 315722454 137008633 257 587 373
9 322838344 140267173 263 683 283
9 337564425 147547031 277 463 347
9 355685601 156123127 293 563 487
9 371827481 163643401 307 673 397
9 414667531 179494813 337 547 433
9 427867537 185990209 349 709 439
9 427814771 185955409 349 661 631
10 101607223 101607223 101 607 223
10 139977727 139977727 139 977 727
10 151977359 151977359 151 977 359
10 173787599 173787599 173 787 599
10 179937223 179937223 179 937 223
10 179263229 179263229 179 263 229
10 223439353 223439353 223 439 353
10 229863313 229863313 229 863 313
10 233883359 233883359 233 883 359
10 239907727 239907727 239 907 727
10 263769491 263769491 263 769 491
10 263823499 263823499 263 823 499
10 263751661 263751661 263 751 661
10 271953919 271953919 271 953 919
10 277563313 277563313 277 563 313
10 281619461 281619461 281 619 461
10 283641439 283641439 283 641 439
10 283929727 283929727 283 929 727
10 293787631 293787631 293 787 631
10 313557347 313557347 313 557 347
10 313653631 313653631 313 653 631
10 337881421 337881421 337 881 421
10 347733613 347733613 347 733 613
10 359457379 359457379 359 457 379
10 401521457 401521457 401 521 457
10 401877653 401877653 401 877 653
10 409977773 409977773 409 977 773
10 431907461 431907461 431 907 461
10 433683659 433683659 433 683 659
10 439853647 439853647 439 853 647
10 439911691 439911691 439 911 691
10 443509463 443509463 443 509 463
10 461601463 461601463 461 601 463
10 521769761 521769761 521 769 761
10 523797773 523797773 523 797 773
10 569983823 569983823 569 983 823
10 571797739 571797739 571 797 739
10 587937683 587937683 587 937 683
10 599853797 599853797 599 853 797
10 601887787 601887787 601 887 787
10 617937823 617937823 617 937 823
10 619809677 619809677 619 809 677
10 631971911 631971911 631 971 911
10 691823809 691823809 691 823 809
11 1064A7298 225788527 127 601 349
11 10AA83423 233806631 131 1301 509
11 117AA1A03 248006443 139 1321 1213
11 12893725A 269008717 151 1129 307
11 128A36551 269168791 151 1249 661
11 1338921AA 279558157 157 1069 241
11 133766304 279358633 157 919 367
11 133A7A706 279862237 157 1297 853
11 139706524 289900417 163 853 631
11 14249A209 296640221 167 593 251
11 15398A407 318689807 179 1187 491
11 155629579 321660799 181 757 691
11 166342227 342455923 193 409 271
11 197423373 402822269 227 509 443
11 199656524 406735597 229 787 631
11 1A26A33A6 413890901 233 839 479
11 227A7A623 481820089 271 1297 751
11 227A63678 481796191 271 1279 811
11 232A36535 492385459 277 1249 643
11 25A595502 544813513 307 709 607
11 351759362 743497031 419 911 431
11 351847643 743641121 419 1019 773
11 353827711 747155047 421 997 859
11 36A904623 779170813 439 1093 751
11 38AA07775 818310377 461 1217 929
11 418913566 892563953 503 1103 677
11 423A12759 903353273 509 1223 911
11 452926694 959902057 541 1117 829
11 4A580970A 1062466283 599 977 857
11 5089317AA 1087462573 613 1123 967
11 579A63766 1225851919 691 1279 919
11 711AA18A9 1523530237 859 1321 1087
11 755A25887 1608453337 907 1237 1063
11 786908803 1668499979 941 1097 971
11 931A7AA74 1991190601 1123 1297 1291
12 105435291 445978189 149 617 397
12 107B1B1A7 453660751 151 1607 271
12 11768B327 488393743 163 971 463
12 141481447 577458487 193 673 631
12 1717474BB 685627919 229 1063 719
12 175535377 697049803 233 761 523
12 181A35267 722181679 241 1481 367
12 18B661325 751101581 251 937 461
12 195927775 769692041 257 1327 1097
12 19BA451B7 787893979 263 1493 283
12 19B8AB2B1 787531237 263 1283 421
12 1B5A6BA37 841694731 281 1523 1483
12 221B9127B 937538879 313 1693 383
12 221A45817 937194067 313 1493 1171
12 2415B5541 1007758273 337 857 769
12 251A879B1 1044776149 349 1543 1429
12 2559874BB 1056470543 353 1399 719
12 25BAA7427 1074676639 359 1567 607
12 277865675 1133812601 379 1229 953
12 27B6655B1 1145258773 383 941 853
12 285B71357 1164432307 389 1669 499
12 291B9588B 1188369323 397 1697 1259
12 2AB531401 1252435969 419 757 577
12 2BB85B69B 1289073431 431 1223 983
12 3019215BB 1295214623 433 1321 863
12 307435321 1311913609 439 617 457
12 30B971617 1325178163 443 1381 883
12 325705465 1378289741 461 1013 653
12 35B7BB415 1503939473 503 1151 593
12 35B91B46B 1504229843 503 1319 659
12 36558B397 1521295459 509 827 547
12 36566B397 1521502819 509 947 547
12 375B31A35 1558500233 521 1621 1481
12 391745557 1617251539 541 1061 787
12 397AA740B 1636041611 547 1567 587
12 3A5785775 1665110537 557 1109 1097
12 415A417A1 1773262633 593 1489 1129
12 41B8A5427 1790811679 599 1277 607
12 431867587 1832536183 613 1231 823
12 447A3751B 1886719271 631 1483 743
12 447B95A27 1887089791 631 1697 1471
12 46577B675 1951754489 653 1103 953
12 46BA415BB 1970337311 659 1489 863
12 4819B1655 2012037473 673 1429 929
12 48566B59B 2023148423 677 947 839
12 4B1B2B705 2119861301 709 1619 1013
12 535A959B5 2275018841 761 1553 1433
12 5BBB21A41 2579686033 863 1609 1489
12 63B9AB7BB 2722698431 911 1427 1151
12 647B71797 2747004451 919 1669 1123
12 68BB9169B 2902316951 971 1693 983
12 80B8AB851 3474917629 1163 1283 1213
12 965A11971 4102268197 1373 1453 1381
clc,clearvars
idxOuter=combinator(3,3,'p');
for base=2:12
prms=primes(base^3);
indices=combinator(length(prms),3,'c');
for i=1:length(indices)
idx=indices(i,:);
pset=prms(idx);
good=true;
for j=1:6
idx=idxOuter(j,:);
ps=pset(idx);
psave=ps;
p=sum(ps.*base.^[6 3 0]);
ps=dec2base(p,base);
if length(ps)~=9
good=false;
break
end
if ~isprime(p)
good=false;
break
end
end
if good
fprintf('%2d %s %d %d %d %d\n',base,ps,p,psave)
end
end
end
|
Posted by Charlie
on 2023-07-20 13:55:46 |