Repunits are numbers that consist entirely of repetitions of the digit one (unity). The notation Rn symbolizes the repunit made up of n ones.

Every prime p larger than 5, evenly divides the repunit Rp-1.



E.G.
The repunit R6 is evenly divisible by 7.

111111 / 7 = 15873

The repunit R42 is evenly divisible by 43.

111111111111111111111111111111111111111111 / 43 = 2583979328165374677002583979328165374677

And so on.



There are composite numbers that also have this same property. They are often referred to as deceptive non-primes or deceptive numbers.



The repunit R90 is evenly divisible by the composite number 91 (=7*13).

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 / 91 = 1221001221001221001221001221001221001221001221001221001221001221001221001221001221001221


Task 
 Find and show at least the first 10 deceptive numbers; composite numbers n that evenly divide the repunit Rn-1


See also
 Numbers Aplenty - Deceptive numbers
 OEIS:A000864 - Deceptive nonprimes: composite numbers k that divide the repunit R_{k-1}




with javascript_semantics
constant limit = 70
atom t0 = time()
include mpfr.e
mpz repunit = mpz_init(0)
integer n = 1, count = 0
printf(1,"The first %d deceptive numbers are:\n",limit)
while count<limit do
    -- No repunit is ever divisible by 2 or 5 since it ends in 1.
    -- If n is 3*k, sum(digits(repunit))=3*k-1, not divisible by 3.
    -- Hence only check odd and hop any multiples of 3 or 5.
    n += 2
    mpz_mul_si(repunit,repunit,100)
    mpz_add_si(repunit,repunit,11)
    if gcd(n,3*5)=1 
    and not is_prime(n)
    and mpz_divisible_ui_p(repunit,n) then
        count += 1
        printf(1," %7d%n",{n,remainder(count,10)=0})
    end if
end while
printf(1,"%s\n",elapsed(time()-t0))
