Skip to content

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

Notifications You must be signed in to change notification settings

egison-libs/project-euler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages