[This post is (eventually: was) from http://www.solbakkn.com/math/ngramdetail.htm .]
N-Grams are derived from the mathematical and graphical properties of the enneagram. The enneagram is a “paired” N-Gram, that is, composed of two “atomic” N-Grams which complement each other. (A pair of atomic N-Grams both use the same number base, together touch every point around the perimeter of the N-Gram, and have no overlap except at the top point of the N-Gram.) Each atomic N-Gram represents division by an integer x in a larger integer base y. The tables included elsewhere are organized to show progression and relationships between the various N-Grams.
Numbering the points: The figure of the enneagram is enclosed in a circle with nine points around the perimeter, numbered clockwise from 0 (zero) to 9, with both 0 and 9 at the top point of the figure. The digits may not be included (zero rarely is) when the enneagram is drawn, but are implicit in any case. To generalize for other bases, the top point in each of the N-Grams represents both 0 and the largest digit (in the numeric base being used). [All figures using base b have b-1 points, numbered (from the top around to the top again) 0 to b-1.] Rather than numbering the perimeter points I have used (in the table organized by divisor) radial dashed lines to mark their position and to distinguish the numeric base of a figure.
Separation of components: Separating the Enneagram into its “atoms” permits including in the pattern for division by 7 a circle at point 9, representing 7/7, in the same way that the circle at point 9 represents 3/3 in the pattern for division by 3.
Representing repeating digits: The lines inside the enneagram’s circle represent two sets of repeating digits. In base 10, 1/7=0.142857142857… where the pattern 142857 repeats indefinitely. The fractions 2/7 through 6/7 are expressed with exactly the same six repeating digits, but with different starting points (2/7=0.285714…; 6/7=0.857142…). Also in base 10, 1/3=0.333…, 2/3=0.666…, 3/3=0.999…. [Mathematically, 0.999… has the same value as 1.000… because the difference between the two can be shown to be less than any arbitrarily small value.] The “classic” enneagram has a triangle connecting points 0369 and a six-line shape connecting points 1428571.
When a repeating pattern has only a single digit (as with 1/3, etc. here), I have drawn a small circle at that point on the N-Gram rather than connecting it by a line to other points. To me this better expresses the nature of the repetition for that point. When a repeating pattern has two or more digits (as with 1/7, etc. here), I have used arrows to connect the points, thereby showing the direction in which the digits form their repetition.
Summary of differences: Compared to the classic enneagram, my atomic N-Gram figures have the following differences.
- When repetitions involve a single digit, a circle at that digit’s point is used rather than a line connecting it with other single-digit repetitions.
- When repetitions involve more than one digit, arrows indicate the order in which the digits occur. (Arrows are sometimes used in drawings of the enneagram).
- Each figure represents the pattern formed from division by a single number using a specific numeric base.
Representing patterns that do not repeat: Some divisions form no repeating pattern (other than all zeroes). For instance, 1/2 in base 10 is 0.5. No additional digits are needed to express an exact value. Whenever a divisor creates no repeating patterns, the corresponding circle in the tables is shaded with gray. If a divisor creates some repeating and some non-repeating patterns, the center of its corresponding circle is shaded gray and the repeating patterns that do form are included. Mathematically, gray shading occurs if the base and divisor have one or more prime factors in common.
Arithmetic in Bases Other than Ten
To give an example of how arithmetic is done in another number base, below is an example, calculating 1/3 in base 5. You will find the resulting pattern (0.1313…) represented as the horizontal line in the paired N-Gram for p=2 (to the left). Note that the pattern for 2/3 in base 5 is 0.3131…. The two dots (at the top and bottom of the figure) are a representation of division by 2 in base 5 (0/2 = 0.000…, 1/2 = 0.222…, 2/2 = 0.444…).
In base 5, the digits used range from 0 to 4. The number 10 is five (one five and no ones). The number 100 is twenty-five (one five-times-five, no fives, and no ones). The number 234 is the base 5 representation for sixty nine ( two twenty-fives plus three fives plus 4, or 2×25 + 3×5 +4 = 69).