2.3 KiB
2.3 KiB
id | challengeType | title |
---|---|---|
5900f5191000cf542c51002b | 5 | Problem 428: Necklace of Circles |
Description
The triplet (a, b, c) is called a necklace triplet if you can place k ≥ 3 distinct circles C1, C2, ..., Ck such that:
- Ci has no common interior points with any Cj for 1 ≤ i, j ≤ k and i ≠ j,
- Ci is tangent to both Cin and Cout for 1 ≤ i ≤ k,
- Ci is tangent to Ci+1 for 1 ≤ i < k, and
- Ck is tangent to C1.
Let T(n) be the number of necklace triplets (a, b, c) such that a, b and c are positive integers, and b ≤ n. For example, T(1) = 9, T(20) = 732 and T(3000) = 438106.
Find T(1 000 000 000).
Instructions
Tests
tests:
- text: <code>necklace(1000000000)</code> should return 747215561862.
testString: assert.strictEqual(necklace(1000000000), 747215561862, '<code>necklace(1000000000)</code> should return 747215561862.');
Challenge Seed
function necklace(n) {
// Good luck!
return true;
}
necklace(1000000000)
Solution
// solution required