코딩 연습

프로젝트 오일러 133번 본문

project euler with python

프로젝트 오일러 133번

코딩아저씨 2016. 3. 15. 16:02
반응형

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.

Let us consider repunits of the form R(10n).

Although R(10),R(100), or R(1000) are not divisible by 17, R(10000) is divisible by 17. Yet there is no value of n for which R(10n) will divide by 19. In fact, it is remarkable that 11,17,41, and 73 are the only four primes below one-hundred that can be a factor of R(10n).

Find the sum of all the primes below one-hundred thousand that will never be a factor of R(10n).




1 들로만 이루어진 수를 repunit 이라고 한다. R(k)k 개의 1 로 이루어진 수라고 하자. 예를 들어, R(6)=111111 이다.

이제 R(10n) 을 생각해 보자.

R(10),R(100),R(1000)17 로 나누어 떨어지지 않는 반면, R(10000)17 로 나누어 떨어진다. 19 의 경우는 R(10n)19 로 나누어 떨어지는 자연수 n 이 존재하지 않는다. 사실 R(10n) 의 소인수가 되는 100 미만의 소수는 11,17,41.73 의 단 네 개 뿐이다.

R(10n) 의 소인수가 되지 않는 105 미만의 모든 소수들의 합을 구하시오.


이 문제는 132번 문제를 풀고 왔다면 바로 해결할 수 있다.


반응형

'project euler with python' 카테고리의 다른 글

프로젝트 오일러 135번  (0) 2016.03.15
프로젝트 오일러 134번  (0) 2016.03.15
프로젝트 오일러 132번  (0) 2016.03.15
프로젝트 오일러 131번  (0) 2016.03.15
프로젝트 오일러 130번  (0) 2016.03.15


Comments