Problem

Source: Regional Olympiad - Federation of Bosnia and Herzegovina 2012

Tags: prime, number theory



Let $a$, $b$, $c$, $d$, $e$, $f$ and $g$ be seven distinct positive integers not bigger than $7$. Find all primes which can be expressed as $abcd+efg$