Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Emirp-primes/Mathematica/emirp-primes-1.math
Normal file
1
Task/Emirp-primes/Mathematica/emirp-primes-1.math
Normal file
|
|
@ -0,0 +1 @@
|
|||
reverseDigits[n_Integer] := FromDigits@Reverse@IntegerDigits@n
|
||||
2
Task/Emirp-primes/Mathematica/emirp-primes-2.math
Normal file
2
Task/Emirp-primes/Mathematica/emirp-primes-2.math
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
emirpQ[n_Integer] :=
|
||||
Block[{rev = reverseDigits@n}, And[n != rev, PrimeQ[rev]]]
|
||||
2
Task/Emirp-primes/Mathematica/emirp-primes-3.math
Normal file
2
Task/Emirp-primes/Mathematica/emirp-primes-3.math
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
nextEmirp[n_Integer] :=
|
||||
NestWhile[NextPrime, NextPrime[n], ! emirpQ[#] &]
|
||||
1
Task/Emirp-primes/Mathematica/emirp-primes-4.math
Normal file
1
Task/Emirp-primes/Mathematica/emirp-primes-4.math
Normal file
|
|
@ -0,0 +1 @@
|
|||
Rest@NestList[nextEmirp, 1, 20]
|
||||
1
Task/Emirp-primes/Mathematica/emirp-primes-5.math
Normal file
1
Task/Emirp-primes/Mathematica/emirp-primes-5.math
Normal file
|
|
@ -0,0 +1 @@
|
|||
Rest@NestWhileList[nextEmirp, 7700, # < 8000 &]
|
||||
1
Task/Emirp-primes/Mathematica/emirp-primes-6.math
Normal file
1
Task/Emirp-primes/Mathematica/emirp-primes-6.math
Normal file
|
|
@ -0,0 +1 @@
|
|||
Nest[nextEmirp, 1, 10000]
|
||||
Loading…
Add table
Add a link
Reference in a new issue