OFFSET
1,1
COMMENTS
These numbers are divisible by 7 if the number of repeat digits d, is not a multiple of 6. Given the Sum = ((10^d)^6 - 1))/(10^d-1) from Fermat's little theorem, we note that (10^d)^(7-1) == 1 (mod 7) as required. The case when the repeat digits d = 6k we have the denominator of the Sum (10^k)^6 - 1 which by Fermat's little theorem again is divisible by 7. Thus 7 is canceled from the Sum and the sum is then not divisible by 7. It remains to prove this last statement. Also it appears 7 divides (10^k)^6 q+1 times when k = a*7^q. Obviously this method could be extended to divisibility by any prime.
REFERENCES
The question arose on the mathforfun(AT)yahoogroups.com. Mansoor Anees asked: When an integer or a set of integers is repeated six times to form a new integer, it is divisible by 7. Why? For example, 121212121212 and 123123123123123123 and 444444 are divisible by 7.
FORMULA
Sum = (10^d)^5 + (10^d)^4 + . . . + (10^d)^1 + 1 = ((10^d)^6 - 1))/(10^d-1).
EXAMPLE
If n = 2 we have the number 10101010101. Multiply this by 13 to get 131313131313. and 131313131313/7 = 18759018759.
PROG
(PARI) divseven(n) = { for(x=1, n, y=((10^x)^6-1)/(10^x-1); if(y%7==0, print1(y", "))) }
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Cino Hilliard, Sep 13 2004
STATUS
approved