From: David Wilson <davidwwilson@comcast.net> Let p >= 10^d, and let 0 <= B < 10^d be any d-digit block of digits. By the definition of the ceiling function [1] pB/10^d <= ceil(pB/10^d) < pB/10^d + 1. Dividing by p gives [2] B/10^d <= ceil(pB/10^d)/p < B/10^d + 1/p But p >= 10^d, so 1/p <= 1/10^d, and [3] B/10^d + 1/p <= B/10^d + 1/10^d = (B+1)/10^d [2] and [3] together give [4] B/10^d <= ceil(pB/10^d)/p < (B+1)/10^d Letting n = ceil(pB/10^d), we have integer n with [5] B/10^d <= n/p < (B+1)/10^d [5] says that the decimal fraction n/p starts with block B. So if p >= 10^d, there is a fraction n/p (0 <= n < p) starting with any given d-digit block B, namely n/p = ceil(pB/10^d)/p.
If p > 10^d, then by the previous paragraph, there is a fraction n/p (0 <= n < p) starting with any given d-digit block B. But because p > 10^d, since 0/p and 1/p both start with block B = 0, so we can strengthen the condition on n to 1 <= n < p. In other words:
If p > 10^d, there is a fraction n/p (1 <= n < p) starting with any given d-digit block B.
Now suppose p > 10^d and p has primitive root 10. Because of the primitive root 10, every n with 1 <= n < p is expressible as n = 10^k mod p for some 0 <= k < p-1. By our previous paragraph, there is then a fraction of the form (10^k mod p) / p starting with any desired d-digit block B. From this we conclude that every d-digit block occurs somewhere in the decimal expansion of 1/p.
--this is a nice theorem, and it might be a new one. It is also of some importance because it proves a randomness property of the Marsaglia type of pseudorandom number generator. To determine if it is new, I suggest looking to see if it is in Hardy & Wright chapter 9 as step one. Frankly though, it looks too easy to have escaped previous notice.
In other words, any prime p > 10^d with primitive root 10 includes every d-digit block in the decimal expansion of its reciprocal. This is why I must choose the smallest such prime if I am looking for the first number with that property.
I can show that the smallest number n whose decimal reciprocal includes every d-digit block must satisfy n >= 10^d.
--well, that seems trivial since the period<n.
I can also show that the reciprocal of the smallest prime p > 10^d with primitive root 10 includes every d-digit block. I can show that if p < 2*10^d,
--you do not need this "if" because of the known theorem that there is always a prime between X and 2X if X>1: http://en.wikipedia.org/wiki/Bertrand's_postulate
then there is no other prime q with 10^d <= q < p whose reciprocal includes every d-digit block. What I can't show is that there is not some composite q with 10^d <= q < p whose reciprocal includes every d-digit block, though I seriously doubt such a q could exist.
--if q=a*b*...*c where a,b,...,c are primes with 10 primitive modulo each of them, then every n with 1<=n<q and gcd(n,q)=1 is expressible as n = 10^k mod q for some 0<=k<p-1. However, each n with gcd(n,q)>1 definitely is NOT thus-expressible. This tells me that the decimal expansion of 1/q with q composite, q>10, NEVER includes all k-digit blocks where k=floor(log10(q)), because those blocks are exactly the opening bars of 10^j/q. To prove that, there are two cases: case i: q>10 contains a prime p with p>10. Then the multiples of q/p are unrepresentable and include examples below 10^k case ii: q>10 contains a prime p<10, then the multiples of p do the job. QED.