Hey folks,
I recently wrote a blog post with a very small computational treatment of exploring abundant, deficient, and perfect numbers (the latter only briefly) alongside aliquot sequences. This was my first foray into number theory and had a bit of fun with it! Thought I’d share it in case folks find it interesting: A Fun Exploration of Perfect, Abundant, and Deficient Numbers
What was interesting to me was some encounters that I experienced while working with, in particular, aliquot sequences. What I did not realize is that an aliquot sequence can grow to be monstrous in terms of computation. To give an example, I was innocently computing aliquot sequences for several abundant numbers and strangely hit errors when computing on the value n = 138. I didn’t know why I kept getting truncation errors within my computations. I looked up this particular number and discovered that the aliquot sequence for n= 138 has 177 aliquot terms in the sequence! It apparently encounters numbers so big that it was leading to truncation errors.
Furthermore, when tinkering with how to present some of my computational explorations, I decided to use UnicodePlots. This isn’t so much a problem as it is a commendation to say – WOW what a fantastic package! It made showing visualizations terribly easy and fun! Here’s a plot I made just for fun:
Divisor Count for First 1000 Abundant Numbers
┌ ┐
1 ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 1 000
2 ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 995
3 ┤■■■■■■■■■■■■■■■■■■■■■■ 677
4 ┤■■■■■■■■■■■■■■■■■■■■■ 623
5 ┤■■■■■■■■■■ 308
6 ┤■■■■■■■■■■■■■■■■■■■■■■ 672
7 ┤■■■■■■■ 216
8 ┤■■■■■■■■■■■ 347
9 ┤■■■■■■■■ 229
Divisors 10 ┤■■■■■■■■■■ 303
11 ┤■■■■ 116
12 ┤■■■■■■■■■■■ 336
13 ┤■■■ 96
14 ┤■■■■■■■ 211
15 ┤■■■■■ 139
16 ┤■■■■■■ 188
17 ┤■■ 68
18 ┤■■■■■■■ 224
19 ┤■■ 61
20 ┤■■■■■■■ 201
└ ┘
Count
Otherwise, like I said in the conclusion of my blog post, I don’t know what other sorts of computational treatments I could do here and how much analogies hold between math domains, but I would love to hear people’s thoughts on that! In terms of Julia specific questions, I was wondering:
- How can I handle extremely large numbers within Julia gracefully?
- How can I compute upon extremely large numbers within Julia gracefully?
What I mean by huge for example is the 8^{\text{th}} perfect number, 2305843008139952128, and so forth.
Thanks all!
~ tcp