yaworsw/euler-manager

View on GitHub
data/problems/129.yml

Summary

Maintainability
Test Coverage
---
:id: 129
:name: Repunit divisibility
:url: https://projecteuler.net/problem=129
:content: |+
  A number consisting entirely of ones is called a repunit. We shall define R(_k_) to be a repunit of length _k_; for example, R(6) = 111111.

  Given that _n_ is a positive integer and GCD(_n_, 10) = 1, it can be shown that there always exists a value, _k_, for which R(_k_) is divisible by _n_, and let A(_n_) be the least such value of _k_; for example, A(7) = 6 and A(41) = 5.

  The least value of _n_ for which A(_n_) first exceeds ten is 17.

  Find the least value of _n_ for which A(_n_) first exceeds one-million.