Inmathematics, ann-parasitic number (inbase 10) is a positivenatural number which, whenmultiplied byn, results in movement of the lastdigit of itsdecimal representation to its front. Heren is itself a single-digit positive natural number. In other words, the decimal representation undergoes a rightcircular shift by one place. For example:
Most mathematicians do not allowleading zeros to be used, and that is a commonly followed convention.
So even though 4 × 25641 = 102564, the number 25641 isnot 4-parasitic.
Ann-parasitic number can be derived by starting with a digitk (which should be equal ton or greater) in the rightmost (units) place, and working up one digit at a time.For example, forn = 4 andk = 7
So 179487 is a 4-parasitic number with units digit 7. Others are 179487179487, 179487179487179487, etc.
Notice that therepeating decimal
Thus
In general, ann-parasitic number can be found as follows. Pick a one digit integerk such thatk ≥n, and take the period of therepeating decimalk/(10n−1).This will bewherem is the length of the period; i.e. themultiplicative order of 10modulo(10n − 1).
For another example, ifn = 2, then 10n − 1 = 19 and the repeating decimal for 1/19 is
So that for 2/19 is double that:
The lengthm of this period is 18, the same as the order of 10 modulo 19, so2 × (1018 − 1)/19 = 105263157894736842.
105263157894736842 × 2 = 210526315789473684, which is the result of moving the last digit of 105263157894736842 to the front.
The step-by-step derivation algorithm depicted above is a great core technique but will not find all n-parasitic numbers. It will get stuck in an infinite loop when the derived number equals the derivation source. An example of this occurs when n = 5 and k = 5. The 42-digit n-parasitic number to be derived is 102040816326530612244897959183673469387755. Check the steps in Table One below. The algorithm begins building from right to left until it reaches step 15—then the infinite loop occurs. Lines 16 and 17 are pictured to show that nothing changes. There is a fix for this problem, and when applied, the algorithm will not only find alln-parasitic numbers in base ten, it will find them in base 8 and base 16 as well. Look at line 15 in Table Two. The fix, when this condition is identified and then-parasitic number has not been found, is simply to not shift the product from the multiplication, but use it as is, and appendn (in this case 5) to the end. After 42 steps, the proper parasitic number will be found.
1. 5 × 5 = 25 − Shift = 55 |
2. 5 × 55 = 275 − Shift = 755 |
3. 5 × 755 = 3775 − Shift = 7755 |
4. 5 × 7755 = 38775 − Shift = 87755 |
5. 5 × 87755 = 438775 − Shift = 387755 |
6. 5 × 387755 = 1938775 − Shift = 9387755 |
7. 5 × 9387755 = 46938775 − Shift = 69387755 |
8. 5 × 69387755 = 346938775 − Shift = 469387755 |
9. 5 × 469387755 = 2346938775 − Shift = 3469387755 |
10. 5 × 3469387755 = 17346938775 − Shift = 73469387755 |
11. 5 × 73469387755 = 367346938775 − Shift = 673469387755 |
12. 5 × 673469387755 = 3367346938775 − Shift = 3673469387755 |
13. 5 × 3673469387755 = 18367346938775 − Shift = 83673469387755 |
14. 5 × 83673469387755 = 418367346938775 − Shift = 183673469387755 |
15. 5 × 183673469387755 = 918367346938775 − Shift = 183673469387755 |
16. 5 × 183673469387755 = 918367346938775 − Shift = 183673469387755 |
17. 5 × 183673469387755 = 918367346938775 − Shift = 183673469387755 |
1. 5 × 5 = 25 − Shift = 55 |
2. 5 × 55 = 275 − Shift = 755 |
3. 5 × 755 = 3775 − Shift = 7755 |
4. 5 × 7755 = 38775 − Shift = 87755 |
5. 5 × 87755 = 438775 − Shift = 387755 |
6. 5 × 387755 = 1938775 − Shift = 9387755 |
7. 5 × 9387755 = 46938775 − Shift = 69387755 |
8. 5 × 69387755 = 346938775 − Shift = 469387755 |
9. 5 × 469387755 = 2346938775 − Shift = 3469387755 |
10. 5 × 3469387755 = 17346938775 − Shift = 73469387755 |
11. 5 × 73469387755 = 367346938775 − Shift = 673469387755 |
12. 5 × 673469387755 = 3367346938775 − Shift = 3673469387755 |
13. 5 × 3673469387755 = 18367346938775 − Shift = 83673469387755 |
14. 5 × 83673469387755 = 418367346938775 − Shift = 183673469387755 |
15. 5 × 183673469387755 = 918367346938775 − Shift = 9183673469387755 |
16. 5 × 9183673469387755 = 45918367346938775 − Shift = 59183673469387755 |
17. 5 × 59183673469387755 = 295918367346938775 − Shift = 959183673469387755 |
There is one more condition to be aware of when working with this algorithm, leading zeros must not be lost. When the shift number is created it may contain a leading zero which is positionally important and must be carried into and through the next step. Calculators and computer math methods will remove leading zeros. Look at Table Three below displaying the derivation steps forn = 4 andk = 4. The Shift number created in step 4, 02564, has a leading zero which is fed into step 5 creating a leading zero product. The resulting Shift is fed into Step 6 which displays a product proving the 4-parasitic number ending in 4 is 102564.
1. 4 × 4 = 16 − Shift = 64 |
2. 4 × 64 = 256 − Shift = 564 |
3. 4 × 564 = 2256 − Shift = 2564 |
4. 4 × 2564 = 10256 − Shift = 02564 |
5. 4 × 02564 = 010256 − Shift = 102564 |
6. 4 × 102564 = 410256 − Shift = 102564 |
The smallestn-parasitic numbers are also known asDyson numbers, after a puzzle concerning these numbers posed byFreeman Dyson.[1][2][3] They are: (leading zeros are not allowed) (sequenceA092697 in theOEIS)
n | Smallestn-parasitic number | Digits | Period of |
---|---|---|---|
1 | 1 | 1 | 1/9 |
2 | 105263157894736842 | 18 | 2/19 |
3 | 1034482758620689655172413793 | 28 | 3/29 |
4 | 102564 | 6 | 4/39 |
5 | 142857 | 6 | 7/49 = 1/7 |
6 | 1016949152542372881355932203389830508474576271186440677966 | 58 | 6/59 |
7 | 1014492753623188405797 | 22 | 7/69 |
8 | 1012658227848 | 13 | 8/79 |
9 | 10112359550561797752808988764044943820224719 | 44 | 9/89 |
In general, if we relax the rules to allow a leading zero, then there are 9n-parasitic numbers for eachn. Otherwise only ifk ≥n then the numbers do not start with zero and hence fit the actual definition.
Othern-parasitic integers can be built by concatenation. For example, since 179487 is a 4-parasitic number, so are 179487179487, 179487179487179487 etc.
Induodecimal system, the smallestn-parasitic numbers are: (using inverted two and three for ten and eleven, respectively) (leading zeros are not allowed)
n | Smallestn-parasitic number | Digits | Period of |
---|---|---|---|
1 | 1 | 1 | 1/Ɛ |
2 | 10631694842 | Ɛ | 2/1Ɛ |
3 | 2497 | 4 | 7/2Ɛ = 1/5 |
4 | 10309236ᘔ88206164719544 | 1Ɛ | 4/3Ɛ |
5 | 1025355ᘔ9433073ᘔ458409919Ɛ715 | 25 | 5/4Ɛ |
6 | 1020408142854ᘔ997732650ᘔ18346916306 | 2Ɛ | 6/5Ɛ |
7 | 101899Ɛ864406Ɛ33ᘔᘔ15423913745949305255Ɛ17 | 35 | 7/6Ɛ |
8 | 131ᘔ8ᘔ | 6 | ᘔ/7Ɛ = 2/17 |
9 | 101419648634459Ɛ9384Ɛ26Ɛ533040547216ᘔ1155Ɛ3Ɛ12978ᘔ399 | 45 | 9/8Ɛ |
ᘔ (10) | 14Ɛ36429ᘔ7085792 | 14 | 12/9Ɛ = 2/15 |
Ɛ (11) | 1011235930336ᘔ53909ᘔ873Ɛ325819Ɛ9975055Ɛ54ᘔ3145ᘔ42694157078404491Ɛ | 55 | Ɛ/ᘔƐ |
In strict definition, least numberm beginning with 1 such that the quotientm/n is obtained merely by shifting the leftmost digit 1 ofm to the right end are
They are the period ofn/(10n − 1), also the period of thedecadic integer -n/(10n − 1).
Number of digits of them are