]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/project-euler/203/203.factor
project-euler: Rewrap, update links, add copyrights, tests
[factor.git] / extra / project-euler / 203 / 203.factor
index fde3d959b9b5c3abf485ff844f5ab83f5d9b6c1e..be2796d50b692bee49732b3c91902a5cef89fe48 100644 (file)
@@ -1,16 +1,16 @@
 ! Copyright (c) 2008 Eric Mertens.
 ! See https://factorcode.org/license.txt for BSD license.
-USING: kernel math math.primes.factors math.vectors sequences sets
-project-euler.common ;
+USING: kernel math math.primes.factors math.vectors sequences
+sets project-euler.common ;
 IN: project-euler.203
 
-! https://projecteuler.net/index.php?section=problems&id=203
+! https://projecteuler.net/problem=203
 
 ! DESCRIPTION
 ! -----------
 
-! The binomial coefficients nCk can be arranged in triangular form, Pascal's
-! triangle, like this:
+! The binomial coefficients nCk can be arranged in triangular
+! form, Pascal's triangle, like this:
 
 !                   1
 !                 1   1
@@ -22,16 +22,18 @@ IN: project-euler.203
 !     1   7  21  35  35  21   7   1
 !               .........
 
-! It can be seen that the first eight rows of Pascal's triangle contain twelve
-! distinct numbers: 1, 2, 3, 4, 5, 6, 7, 10, 15, 20, 21 and 35.
+! It can be seen that the first eight rows of Pascal's triangle
+! contain twelve distinct numbers: 1, 2, 3, 4, 5, 6, 7, 10, 15,
+! 20, 21 and 35.
 
-! A positive integer n is called squarefree if no square of a prime divides n.
-! Of the twelve distinct numbers in the first eight rows of Pascal's triangle,
-! all except 4 and 20 are squarefree. The sum of the distinct squarefree numbers
-! in the first eight rows is 105.
+! A positive integer n is called squarefree if no square of a
+! prime divides n. Of the twelve distinct numbers in the first
+! eight rows of Pascal's triangle, all except 4 and 20 are
+! squarefree. The sum of the distinct squarefree numbers in the
+! first eight rows is 105.
 
-! Find the sum of the distinct squarefree numbers in the first 51 rows of
-! Pascal's triangle.
+! Find the sum of the distinct squarefree numbers in the first
+! 51 rows of Pascal's triangle.
 
 
 ! SOLUTION