Last active
October 9, 2018 15:47
-
-
Save xtetsuji/69968989ed7948e67748d7d785512ee7 to your computer and use it in GitHub Desktop.
Is 333...31 prime? Easy shell one-liner checker.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl -e 'for (1..50) { my $n = "3" x $_ . "1"; system "factor", $n; }' | |
31: 31 | |
331: 331 | |
3331: 3331 | |
33331: 33331 | |
333331: 333331 | |
3333331: 3333331 | |
33333331: 33333331 | |
333333331: 17 19607843 | |
3333333331: 673 4952947 | |
33333333331: 307 108577633 | |
333333333331: 19 83 211371803 | |
3333333333331: 523 3049 2090353 | |
33333333333331: 607 1511 1997 18199 | |
333333333333331: 181 1841620626151 | |
3333333333333331: 199 16750418760469 | |
33333333333333331: 31 1499 717324094199 | |
333333333333333331: 333333333333333331 | |
3333333333333333331: 1009 1303427 2534550017 | |
33333333333333333331: 29 29 1039 3389 11256299321 | |
333333333333333333331: 23 164844923 87917500639 | |
3333333333333333333331: 177943 18732590398798117 | |
33333333333333333333331: 61 179 241049 12664572810301 | |
333333333333333333333331: 312929 2228959 477893202221 | |
3333333333333333333333331: 17 821593951 238656128290493 | |
33333333333333333333333331: 821 40600893219650832318311 | |
333333333333333333333333331: 353 2339 2973975469 135748936597 | |
3333333333333333333333333331: 363941 4778539 1916693307238469 | |
33333333333333333333333333331: 829 118259 340008686473920298421 | |
333333333333333333333333333331: 19 19 923361034164358264081255771 | |
3333333333333333333333333333331: 686269 2445767 1985954448389527097 | |
33333333333333333333333333333331: 31 5693 8513 22186726728301344707089 | |
333333333333333333333333333333331: 1019 15923 17077 95581 490313 25669836923 | |
3333333333333333333333333333333331: 2761379 1207126342792254642819161489 | |
33333333333333333333333333333333331: 145501 229093499930126482521311422831 | |
333333333333333333333333333333333331: 1397023 5992169 39819072109164322953413 | |
3333333333333333333333333333333333331: 28529353 83260369550023 1403293418797549 | |
33333333333333333333333333333333333331: 47 131 149 36334845952970355489232350076067 | |
factor: `333333333333333333333333333333333333331' は長すぎます | |
factor: `3333333333333333333333333333333333333331' は長すぎます | |
factor: `33333333333333333333333333333333333333331' は長すぎます | |
factor: `333333333333333333333333333333333333333331' は長すぎます | |
factor: `3333333333333333333333333333333333333333331' は長すぎます | |
factor: `33333333333333333333333333333333333333333331' は長すぎます | |
factor: `333333333333333333333333333333333333333333331' は長すぎます | |
factor: `3333333333333333333333333333333333333333333331' は長すぎます | |
factor: `33333333333333333333333333333333333333333333331' は長すぎます | |
factor: `333333333333333333333333333333333333333333333331' は長すぎます | |
factor: `3333333333333333333333333333333333333333333333331' は長すぎます | |
factor: `33333333333333333333333333333333333333333333333331' は長すぎます | |
factor: `333333333333333333333333333333333333333333333333331' は長すぎます |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ for i in {2..18} ; do n=$(( (10**i - 1) / 3 - 2 )) ; factor $n ; done | |
31: 31 | |
331: 331 | |
3331: 3331 | |
33331: 33331 | |
333331: 333331 | |
3333331: 3333331 | |
33333331: 33333331 | |
333333331: 17 19607843 | |
3333333331: 673 4952947 | |
33333333331: 307 108577633 | |
333333333331: 19 83 211371803 | |
3333333333331: 523 3049 2090353 | |
33333333333331: 607 1511 1997 18199 | |
333333333333331: 181 1841620626151 | |
3333333333333331: 199 16750418760469 | |
33333333333333331: 31 1499 717324094199 | |
333333333333333331: 333333333333333331 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment