Note: Most 2D graphs were generated using Graphviz graph generator, such as the trees graph representations. Most 3D graphs were generated in-house as VRML model, and cast into VOptimizer to display as a picture or video clip.
the TAO
TAOCP - The Art Of Computer Programming - Donald E. Knuth
This encyclopedia of maths in service of computer programming has engaged my time more than any other book; more than "the Leaves" (Walt Whitman's Leaves of Grass), more than the bible, and more than Lord of the Rings series. It is by far the best book on programming I have encountered. Unbelievably tough to chew, and you often find yourself on the verge of giving up. I have taken lots of algorithms and mathematical methods from it, e.g. for my arbitrary precision math libraries (BigNum, Fraction), the Aliquot sequences and the continued fractions.
Some of my favourite chapters: Algorithm (very first chapter), Multiple Precision Arithmetic, Rational Arithmetic, Searching, Continued Fractions.
Fraction Package
Fraction is a class that denotes a rational number, implemented by two BigNums - (Numerator, Denominator) and sign. BigNum is a class for arbitrary length integer.
BigNum was used to calculate large numbers for factoring and prime-number studies, for Aliquot sequences and more.
Fraction package was used to study various mathematical algorithms, among which are:
Approximation to series, s.a. constants (PI, ln(2), e ), trigonometric, exponential and logarithmic.
Continued-fraction and their approximations and uses.
For naive calculation of Aliquot sequences, see OrigChains.cpp .
RUN: Fraction executable shell is available to run very long and complex calculations using the Fraction package. Very simple to use, and very accurate.
Instructions included. Enjoy. Bugs guaranteed to be within.
NOTE: As executables aren't allowed here, please download it as ZIP, and unzip to get the EXE.
Triangles with whole numbers sides (rearranged from serious researchers)
Regular unicursal Hexagrams have 12 unique configurations. Here they are represented as an animation.
Regular unicursal Heptagrams have 39 unique configurations. Here they are represented as an animation.
Number of unique polygrams (A000940 - Number of n-gons with n vertices):
N-gram 3 4 5 6 7 8 9 10 11 12 13 14
# Combinations 1 2 4 12 39 202 1219 9468 83435 836017 9223092 111255228
# Symmetries 1 6 12 18 42 89
Geometry & Topology
Sample work on "non-manifold" 3d-models, to heal the models, as part of a project done to prepare them for efficient compression and rendering.
Some work on knot-theory resulted in building some simple knots in 3d. their names are Goethe, Whitman, Homer, Dante, etc (in "3D models").
One "understandable" model, justly showing the beauty of warping topology is Cyclides - animated mathematical curve (in "3D models").
Cyclides - Mathematical Morphing Animation
Imperial delights: The old British measurements
Aliquot sequences
Aliquot sequences definition: http://en.wikipedia.org/wiki/Aliquot_sequence
Implemented using the Fraction package. Implementations and some results are given below, and downloadable.
Some representations of Aliquot trees are given in graphs shown as images and 3d-models.
Software packages GraphChain (by me) and MSieve (by Jason Papadopoulos etc.) are available for download, and can factorise large numbers and list Aliquot sequences up to 332 bits (100 decimal digits), under the name Aliquot_chain.rar
For further study, download and read the intro's, the model-viewer (Virtue3d-Optimizer @ "3D models") and the models.
Below - Aliquot tree of 73. For example, 73 has 8 numbers leading to it (98, 175, 335, 671, 767, 1007, 1247, 1271).
Twin Bridges depicted as Twin-primes as rectangles, and their Grumps (aliquot grandparents) as ellipses.
Twin Bridges - a curious new way of looking at aliquot sequences
Primes are the most common sinks to Aliquot sequences. Above Twin Primes can hang bridges between Aliquot sequences of the same depth. The first such bridge (11,91;13,93) is formed by aliquot sequencing from Grandparent to Parent to Prime:
91 ==> 21 ==> 11
93 ==> 35 ==> 13
Twin Bridge is defined as the pair of numbers leading in two steps to Twin Primes, with the condition that these two numbers have the same difference (+2) as the difference between the primes in the pair. Aliquot Bridges are few and far between ... sometimes. But there may be more than one bridge over a Twin Prime. The first record amount of such hanging bridges goes to the happy couple (281,283):
281: 59329 1786061 2166737 3846041 3947717 5897777 8889161 27302489 55668449
283: 59331 1786063 2166739 3846043 3947719 5897779 8889163 27302491 55668451
The lowest Aliquot Bridges:
P1 11 17 29 59 59 71 71 101 137 137 137 179 179 191 197 269
B1 91 217 3149 16799 34079 60239 111899 375917 8917 323177 477401 838499 6735059 14329871 1990517 66893
P2 13 19 31 61 61 73 73 103 139 139 139 181 181 193 199 271
B2 93 219 3151 16801 34081 60241 111901 375919 8919 323179 477403 838501 6735061 14329873 1990519 66895
Fermat was wrong, and other mathematical anecdotes in that seriously silly page.
Numbers have individuality too (CONTEXCYPHER-Quadratic Surds): a research project for identifying the source and precise formulation of given unknown numbers, such as CubeRoot(2PI-6) , (exp(2/3)+1)/(exp(4/3)-1), sqrt(1492)-38. It involves Progressive-Continuous-Fractions, which are bloody devious creatures, among other difficulties, such as the identification of a third-degree equation with integer terms (given a real root). After discovering that this project is being thoroughly implemented, it is largely abandoned. Inverse Symbolic Calculator
A year and a half later - reopen the project for the reason that the available ISC isn't solving some simple cases. Notes on the project available to download here.
מדוע לוגריתמים? נכתב לקראת שיעור בלוגריתמים לכיתות ח' (בתוכנית לנוער מוכשר במתמטיקה)
Fair Dice , other than the cubic, and other than the Platonic Solids, are nowhere to be found !!! Fair dice of 7 ("SeptaHedron"), and of 9 ("NinoHedron") sides designed by me are fair, because they have an equal chance to face each of their sides on the floor (not on top, as the top is tilted in most of those). Their 3D-model (VRML) file down here. The algorithm that finds them (3D descent), and C++ implementation can freely be downloaded here.
Homer Simpson's scary maths problems
Hand calculation of primality
In order to check whether a number is prime, the basic method is to test if it divides into any of the first primes, up to its square root. If it isn't divisible by any of them, then it is PRIME.
It is hard to verify by hand whether a suspect integer is prime, unless it divides by the first few primes, namely by {2, 3, 5, 7, 11, 13}. Division by 2, 3 and 5 are well known. in order to find out if a number is divisible by 7, 11 or 13, all we need to verify whether its remainder when dividing by 1001 = 7*11*13 is zero divisible, not prime) or not. Doing it by hand is hard, but by the following method it can be done in your head. Example: is 413681 divisible by the lowest primes? not by 2,3,5. Next, we group the digits into 3 digit numbers from LSB to MSB, and sum up the odd group, sum up the even group, and subtract the smaller sum from the larger sum, giving us a small 3-digit number. If this number is divisible by 7, 11 or 13, then the original number is divisible by either, and NOT a PRIME. {n our example we get 681-413 = 268 --> 134 --> 67, which is a prime (indivisible by 7,11,13), hence 413681 is indivisible up to 16, and still suspected of primality.
The general question I have been asking many times about probable-primes is: "What is the probability of an integer that is indivisible up to 16 to be a prime?" We know fairly precisely the distribution of primes (Fermat and others), and given the density of all integers indivisible by {2, 3, 5, 7, 11, 13} at the vicinity of the suspect, the probability of primality increases.
While the density of primes is (for all practical purposes) is N/ln(N), less known is the local density of primes, which is (for all practical purposes) N/(ln(N)-1) .
That means that we can estimate the probability of primality of a given suspect pretty accurately. The density of primes can be calculated in this PI schema (multiplication series):
Primality-Probability(N) = PI [ (p(i)-1) / p(i) ], where PI denotes a multiplication of all primes p(i) that are smaller than sqrt(N). For example, the prime density around N=2016 is:
PD(2016) = 1/2 * 2/3 * 4/5 * 6/7 * 10/11 * 12/13 * 16/17 * 18/19 * 22/23 * 28/29 * 30/31 * 36/37 * 40/41 * 42/43.
The composite density relative to prime density around 10^9 +- 10^5 is hence:
Prime numbers = 9664; Number of composites (of primes above 15) is 28700; Prime-density(10^9) = 0.0507015 = 1/19.723; Composite-density(10^9) = 1/6.9686 .
Measured Primality-Probability(10^9) = 9664 / (9664+28700) = 0.2519 = 1/3.9700
Theoretical Primality-Probability(10^9) = 1/19.723 / (192 / 1001) = 0.2643 = 1/3.7831
Hand calculations of divisibility by small primes
The Prime Number Maze
During the 90's, William Paulsen investigated a number-maze consisting of primes and their "neighbours". The results raised many questions in several fields of mathematics, notably in number-theory. Some mazes of the lowest parts of this endless "forest" graph were programmed and the results given as GraphViz DOT files and GIF images (PrimeMaze_1000.dot, PrimeMaze_1000.gif), where the number ("1000") represents the number of primes involved.
A 3D models of such mazes was attempted, and are displayed as orthogonal or tetrahedral mazes. Several VTU's to download and view (in "3d models" page, with VOptimizer).
Prime-maze of Group A only, with P < 12500
Prime Maze - sample knots
Prime-Maze of first 256 nodes as orthogonal mesh
Prime-Maze of first 400 nodes as tetrahedral mesh
Minimal coprime arithmetic sequence series
These arithmetic sequences consist of integers larger than one, where all members are coprime.
The smallest members and gaps represent the first member series (OEIS A286650), and the corresponding gap series (OEIS A286651).
The first sequences are {2,3}, {3,4,5}, {5,7,9,11}, {5,7,9,11,13}, {7,13,19,25,31,37}.
The First members series (A286650) starts like: {2,3,5,5,7,7,11,11,11,11,23,23,17,17…}.
The corresponding gaps (A286651) start like: {1,1,2,2,6,6,6,6,30,30,30,30,210,210,210…}
Download the full article, series listings, excel file and C++ code below.
"Prime modulo prime equal prime" arithmetic sequence series (OEIS A287615)
P mod Q = R, P minimal, P > Q > R, all prime, R ordered primes (2,3,5...).
First sequences ('#' means the prime index in the ordered list, e.g. #1 is TWO, #2 is THREE):
R: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71
Q: 3 5 7 11 13 17 31 41 37 37 41 47 43 47 67 73 61 83 83 79
P: 5 13 19 29 37 47 79 101 97 103 113 131 127 137 181 199 181 227 233 229
Download the series documentation (Minimal coprime arithmetic sequence series.docx).
Density and factor distribution of the semiprimes in this article I investigated their distribution, and surmised an asymptotic behaviour which is confirmed with serious number theorists' predictions.
Natural numbers to 1017 (and to 1580 below) as a spread in sectors by their number of prime factors: Red = primes, Orange=P2, Yellow=P3, Green=P4, Blue=P5, Purple=P6...P9).
The Smooth-3 numbers (A003586 ) are numbers of the form n3 = 2^i*3^j ,i≥0,j ≥0.
Here represente as a graph where vertices are connected if they are (n,2n) or (n,3n) .
The Smooth-5 numbers (A051037 ) are numbers of the form n5 = 2^i*3^j*5^k ,i≥0,j ≥0, k≥0.
Here represente as a graph where vertices are connected if they are (n,2n), (n,3n) or (n,5n) .
More Documents, models, images