data/problems/347.yml
---
:id: 347
:name: Largest integer divisible by two primes
:url: https://projecteuler.net/problem=347
:content: "The largest integer ≤ 100 that is only divisible by both the primes 2 and
3 is 96, as 96=32\\*3=2<sup>5</sup>\\*3. For two _distinct_ primes p and q let M(p,q,N)
be the largest positive integer ≤N only divisible by both p and q and M(p,q,N)=0
if such a positive integer does not exist.\n\nE.g. M(2,3,100)=96. \n M(3,5,100)=75
and not 90 because 90 is divisible by 2 ,3 and 5. \nAlso M(2,73,100)=0 because
there does not exist a positive integer ≤ 100 that is divisible by both 2 and 73.\n\nLet
S(N) be the sum of all distinct M(p,q,N). S(100)=2262.\n\nFind S(10 000 000).\n\n"