Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Totient-function/Mathematica/totient-function.math
Normal file
19
Task/Totient-function/Mathematica/totient-function.math
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Do[
|
||||
tmp = EulerPhi[i];
|
||||
If[i - 1 == tmp,
|
||||
Print["\[CurlyPhi](", i, ")=", tmp, ", is prime"]
|
||||
,
|
||||
Print["\[CurlyPhi](", i, ")=", tmp]
|
||||
]
|
||||
,
|
||||
{i, 25}
|
||||
]
|
||||
Count[EulerPhi[Range[100]] - Range[100], -1]
|
||||
Count[EulerPhi[Range[1000]] - Range[1000], -1]
|
||||
Count[EulerPhi[Range[10000]] - Range[10000], -1]
|
||||
Count[EulerPhi[Range[100000]] - Range[100000], -1]
|
||||
(*Alternative much faster way of findings the number primes up to a number*)
|
||||
(*PrimePi[100]*)
|
||||
(*PrimePi[1000]*)
|
||||
(*PrimePi[10000]*)
|
||||
(*PrimePi[100000]*)
|
||||
Loading…
Add table
Add a link
Reference in a new issue