* spelling: accidentally * spelling: announce * spelling: assembly * spelling: avoid * spelling: backend * spelling: because * spelling: claimed * spelling: candidate * spelling: certification * spelling: certified * spelling: challenge * spelling: circular * spelling: it isn't * spelling: coins * spelling: combination * spelling: compliant * spelling: containers * spelling: concise * spelling: deprecated * spelling: development * spelling: donor * spelling: error * spelling: everything * spelling: exceed * spelling: exist * spelling: falsy * spelling: faulty * spelling: forward * spelling: handle * spelling: indicates * spelling: initial * spelling: integers * spelling: issealed * spelling: javascript * spelling: length * spelling: maximum * spelling: minimum * spelling: mutable * spelling: notifier * spelling: coordinate * spelling: passport * spelling: perform * spelling: permuter * spelling: placeholder * spelling: progressively * spelling: semantic * spelling: submission * spelling: submit * spelling: translations * spelling: turquoise * spelling: visualization * spelling: without * spelling: registration * spelling: representation
1.3 KiB
1.3 KiB
id, challengeType, title, forumTopicId
id | challengeType | title | forumTopicId |
---|---|---|---|
5900f4831000cf542c50ff95 | 5 | Problem 278: Linear Combinations of Semiprimes | 301928 |
Description
Note that for a given set of ak, it may be that not all values of b are possible. For instance, if a1 = 5 and a2 = 7, there are no q1 ≥ 0 and q2 ≥ 0 such that b could be 1, 2, 3, 4, 6, 8, 9, 11, 13, 16, 18 or 23.
In fact, 23 is the largest impossible value of b for a1 = 5 and a2 = 7. We therefore call f(5, 7) = 23. Similarly, it can be shown that f(6, 10, 15)=29 and f(14, 22, 77) = 195.
Find ∑ f(pq,pr,q*r), where p, q and r are prime numbers and p < q < r < 5000.
Instructions
Tests
tests:
- text: <code>euler278()</code> should return 1228215747273908500.
testString: assert.strictEqual(euler278(), 1228215747273908500);
Challenge Seed
function euler278() {
// Good luck!
return true;
}
euler278();
Solution
// solution required