]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/project-euler/069/069.factor
project-euler: Rewrap, update links, add copyrights, tests
[factor.git] / extra / project-euler / 069 / 069.factor
index 8c14b9998f2804f4cc551cb681990c67a03fc2d1..9a7af58be3465e57b3de93df2b2605ec5040d2b2 100644 (file)
@@ -4,15 +4,16 @@ USING: combinators kernel math math.primes math.primes.factors
 ranges project-euler.common sequences sequences.extras ;
 IN: project-euler.069
 
-! https://projecteuler.net/index.php?section=problems&id=69
+! https://projecteuler.net/problem=69
 
 ! DESCRIPTION
 ! -----------
 
-! Euler's Totient function, φ(n) [sometimes called the phi function], is used
-! to determine the number of numbers less than n which are relatively prime to
-! n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and
-! relatively prime to nine, φ(9)=6.
+! Euler's Totient function, φ(n) [sometimes called the phi
+! function], is used to determine the number of numbers less
+! than n which are relatively prime to n. For example, as 1, 2,
+! 4, 5, 7, and 8, are all less than nine and relatively prime to
+! nine, φ(9)=6.
 
 !     +----+------------------+------+-----------+
 !     | n  | Relatively Prime | φ(n) | n / φ(n)  |
@@ -28,9 +29,11 @@ IN: project-euler.069
 !     | 10 | 1,3,7,9          | 4    | 2.5       |
 !     +----+------------------+------+-----------+
 
-! It can be seen that n = 6 produces a maximum n / φ(n) for n ≤ 10.
+! It can be seen that n = 6 produces a maximum n / φ(n) for n ≤
+! 10.
 
-! Find the value of n ≤ 1,000,000 for which n / φ(n) is a maximum.
+! Find the value of n ≤ 1,000,000 for which n / φ(n) is a
+! maximum.
 
 
 ! SOLUTION