Skip to content

itzmeanjan/number-theory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

number-theory

cover_photo

Programmatically implementing some Number Theory things 😉

motivation

Recently I stumbled upon a Number-Thoery book, which grabbed my interest pretty quick & I thought about implementing those concepts programmatically. So I started this repo, where I'll keep adding implemented problem-solution pairs, which might be helpful to you. Well I'm planning to stick to GoLang as language of implementation.

Consider contributing to this repo 😉

implementation

Triangular Numbers

  • Find X-th Triangular Number ( formula based, iterative & recursive )
  • Check whether a given number is Triangular or not
  • Verify that sum of reciprocals of first N Triangular Numbers, tends to 2, as N increases
  • Verify that, after 3 next X, triangular numbers are Composite ( non-prime )
  • Finding first X Triangular Numbers, which are Square too
  • Verify whether sum & difference of two distinct Triangular Numbers is Triangular or not
  • Get all Triangular Numbers ( from first X, where X denotes position of Triangular Number in Series ), which can be represented as a sum of two distinct Triangular Numbers
  • Get X Triangular Number Pairs, such that when added & substracted, both of them will be Triangular
  • Represent all +ve integers under 1001, as sum of <= 3 Triangular Numbers

Square Numbers

  • Return N-th Square Number
  • Checking whether a given number is Square or not

Oblong Number

  • Return N-th oblong number
  • Check whether a given number is Oblong or not

Classify given number N

  • Given a number N, classify it into any of one category among three below categories.

Deficient Numbers

Given a number X, we find all factors of X ( lesser than X ), if sum of those factors, is lesser than X, then it's Deficient Number

Perfect Numbers

Given a number X, we find all factors of X ( lesser than X ), if sum of those factors, is equals to X, then it's Perfect Number

Abundant Numbers

Given a number X, we find all factors of X ( lesser than X ), if sum of those factors, is greater than X, then it's Abundant Number

More to come ...

About

Programmatically implementing some Number Theory things 😉

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages