Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
least_divisor_function [2014/03/21 11:11]
127.0.0.1 external edit
least_divisor_function [2015/04/25 18:19]
nikolaj
Line 7: Line 7:
 ==== Discussion ==== ==== Discussion ====
 === Code === === Code ===
 +<code haskell>
 +divides :: Integral a => a -> a -> Bool
 +divides d n = rem n d == 0
 +</​code>​
 +
 <code haskell> <code haskell>
 ld :: Integral a => a -> a ld :: Integral a => a -> a
Line 15: Line 20:
       | k^2 > n     = n       | k^2 > n     = n
  | otherwise ​  = ldf (k+1) n  | otherwise ​  = ldf (k+1) n
 +</​code>​
 +
 +[[Set of divisors function]]:
 +<code haskell>
 +divides :: Integral a => a -> a -> Bool
 +divides d n = rem n d == 0
 </​code>​ </​code>​
 === Theorems === === Theorems ===
Link to graph
Log In
Improvements of the human condition