Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Utility Functions to solve Project Euler

Usage

% egison -l lib/math/project-euler.egi
> (num-to-digits 12345)
{1 2 3 4 5}
> (digits-to-num {1 2 3 4 5})
12345

Function List

sum-of-positive-divisors

> (sum-of-positive-divisors 3)
4     ; 1+3
> (sum-of-positive-divisors 12)
28    ; 1+2+3+4+6+12

sum-of-proper-divisors

> (sum-of-proper-divisors 3)
1
(sum-of-proper-divisors 12)
16    ; 1+2+3+4+6

num-to-digits

> (num-to-digits 12345)
{1 2 3 4 5}

digits-to-num

> (digits-to-num {1 2 3 4 5})
12345

LICENSE

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

About

EgisonLib - lib/math/project-euler.egi : Utility functions to solve project euler problems

Resources

Releases

No releases published

Packages

No packages published

Languages