P773
projecteuler.net

Ruff Numbers

ℹ️Published on Saturday, 20th November 2021, 07:00 pm; Solved by 213;
Difficulty rating: 50%

Let $S_k$ be the set containing $2$ and $5$ and the first $k$ primes that end in $7$. For example, $S_3 = \{2,5,7,17,37\}$.

Define a $k$-Ruff number to be one that is not divisible by any element in $S_k$.

If $N_k$ is the product of the numbers in $S_k$ then define $F(k)$ to be the sum of all $k$-Ruff numbers less than $N_k$ that have last digit $7$. You are given $F(3) = 76101452$.

Find $F(97)$, give your answer modulo $1\,000\,000\,007$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.