From 0a4a50f04021ddfb07a76afd21026738b99ef991 Mon Sep 17 00:00:00 2001 From: Sophanarith Sok Date: Fri, 11 Aug 2017 12:57:00 -0700 Subject: [PATCH] test(seed): Add tests to Project Euler (#15750) Add more tests. Add parameter to function to enable more specific tests and enables easier way to verify a valid function. Update problem description. --- .../project-euler-problems.json | 1623 +++++++++-------- 1 file changed, 813 insertions(+), 810 deletions(-) diff --git a/seed/challenges/08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json b/seed/challenges/08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json index 244b83e2d23..1b06261e496 100644 --- a/seed/challenges/08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json +++ b/seed/challenges/08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json @@ -10,21 +10,24 @@ "type": "bonfire", "title": "Problem 1: Multiples of 3 and 5", "tests": [ - "assert.strictEqual(euler1(), 233168, 'message: \u003ccode\u003eeuler1()\u003c/code\u003e should return 233168.');" + "assert.strictEqual(euler1(1000), 233168, 'message: euler1(1000) should return 233168.');", + "assert.strictEqual(euler1(49), 543, 'message: euler1(49) should return 543.');", + "assert.strictEqual(euler1(19564), 89301183, 'message: euler1(19564) should return 89301183.');", + "assert.strictEqual(euler1(8456), 16687353, 'message: Your function is not returning the correct result using our tests values.');" ], "solutions": [], "translations": {}, "challengeSeed": [ - "function euler1() {", + "function euler1(number) {", " // Good luck!", " return true;", "}", "", - "euler1();" + "euler1(1000);" ], "description": [ "If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.", - "Find the sum of all the multiples of 3 or 5 below 1000." + "Find the sum of all the multiples of 3 or 5 below the provided parameter value number." ] }, { @@ -33,7 +36,7 @@ "type": "bonfire", "title": "Problem 2: Even Fibonacci numbers", "tests": [ - "assert.strictEqual(euler2(), 4613732, 'message: \u003ccode\u003eeuler2()\u003c/code\u003e should return 4613732.');" + "assert.strictEqual(euler2(), 4613732, 'message: euler2() should return 4613732.');" ], "solutions": [], "translations": {}, @@ -57,7 +60,7 @@ "type": "bonfire", "title": "Problem 3: Largest prime factor", "tests": [ - "assert.strictEqual(euler3(), 6857, 'message: \u003ccode\u003eeuler3()\u003c/code\u003e should return 6857.');" + "assert.strictEqual(euler3(), 6857, 'message: euler3() should return 6857.');" ], "solutions": [], "translations": {}, @@ -80,7 +83,7 @@ "type": "bonfire", "title": "Problem 4: Largest palindrome product", "tests": [ - "assert.strictEqual(euler4(), 906609, 'message: \u003ccode\u003eeuler4()\u003c/code\u003e should return 906609.');" + "assert.strictEqual(euler4(), 906609, 'message: euler4() should return 906609.');" ], "solutions": [], "translations": {}, @@ -103,7 +106,7 @@ "type": "bonfire", "title": "Problem 5: Smallest multiple", "tests": [ - "assert.strictEqual(euler5(), 232792560, 'message: \u003ccode\u003eeuler5()\u003c/code\u003e should return 232792560.');" + "assert.strictEqual(euler5(), 232792560, 'message: euler5() should return 232792560.');" ], "solutions": [], "translations": {}, @@ -126,7 +129,7 @@ "type": "bonfire", "title": "Problem 6: Sum square difference", "tests": [ - "assert.strictEqual(euler6(), 25164150, 'message: \u003ccode\u003eeuler6()\u003c/code\u003e should return 25164150.');" + "assert.strictEqual(euler6(), 25164150, 'message: euler6() should return 25164150.');" ], "solutions": [], "translations": {}, @@ -153,7 +156,7 @@ "type": "bonfire", "title": "Problem 7: 10001st prime", "tests": [ - "assert.strictEqual(euler7(), 104743, 'message: \u003ccode\u003eeuler7()\u003c/code\u003e should return 104743.');" + "assert.strictEqual(euler7(), 104743, 'message: euler7() should return 104743.');" ], "solutions": [], "translations": {}, @@ -176,7 +179,7 @@ "type": "bonfire", "title": "Problem 8: Largest product in a series", "tests": [ - "assert.strictEqual(euler8(), 23514624000, 'message: \u003ccode\u003eeuler8()\u003c/code\u003e should return 23514624000.');" + "assert.strictEqual(euler8(), 23514624000, 'message: euler8() should return 23514624000.');" ], "solutions": [], "translations": {}, @@ -220,7 +223,7 @@ "type": "bonfire", "title": "Problem 9: Special Pythagorean triplet", "tests": [ - "assert.strictEqual(euler9(), 31875000, 'message: \u003ccode\u003eeuler9()\u003c/code\u003e should return 31875000.');" + "assert.strictEqual(euler9(), 31875000, 'message: euler9() should return 31875000.');" ], "solutions": [], "translations": {}, @@ -233,7 +236,7 @@ "euler9();" ], "description": [ - "A Pythagorean triplet is a set of three natural numbers, a \u003c b \u003c c, for which,", + "A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,", " a2 + b2 = c2", "For example, 32 + 42 = 9 + 16 = 25 = 52.", "There exists exactly one Pythagorean triplet for which a + b + c = 1000.Find the product abc." @@ -245,7 +248,7 @@ "type": "bonfire", "title": "Problem 10: Summation of primes", "tests": [ - "assert.strictEqual(euler10(), 142913828922, 'message: \u003ccode\u003eeuler10()\u003c/code\u003e should return 142913828922.');" + "assert.strictEqual(euler10(), 142913828922, 'message: euler10() should return 142913828922.');" ], "solutions": [], "translations": {}, @@ -268,7 +271,7 @@ "type": "bonfire", "title": "Problem 11: Largest product in a grid", "tests": [ - "assert.strictEqual(euler11(), 70600674, 'message: \u003ccode\u003eeuler11()\u003c/code\u003e should return 70600674.');" + "assert.strictEqual(euler11(), 70600674, 'message: euler11() should return 70600674.');" ], "solutions": [], "translations": {}, @@ -313,7 +316,7 @@ "type": "bonfire", "title": "Problem 12: Highly divisible triangular number", "tests": [ - "assert.strictEqual(euler12(), 76576500, 'message: \u003ccode\u003eeuler12()\u003c/code\u003e should return 76576500.');" + "assert.strictEqual(euler12(), 76576500, 'message: euler12() should return 76576500.');" ], "solutions": [], "translations": {}, @@ -340,7 +343,7 @@ "type": "bonfire", "title": "Problem 13: Large sum", "tests": [ - "assert.strictEqual(euler13(), 5537376230, 'message: \u003ccode\u003eeuler13()\u003c/code\u003e should return 5537376230.');" + "assert.strictEqual(euler13(), 5537376230, 'message: euler13() should return 5537376230.');" ], "solutions": [], "translations": {}, @@ -463,7 +466,7 @@ "type": "bonfire", "title": "Problem 14: Longest Collatz sequence", "tests": [ - "assert.strictEqual(euler14(), 837799, 'message: \u003ccode\u003eeuler14()\u003c/code\u003e should return 837799.');" + "assert.strictEqual(euler14(), 837799, 'message: euler14() should return 837799.');" ], "solutions": [], "translations": {}, @@ -491,7 +494,7 @@ "type": "bonfire", "title": "Problem 15: Lattice paths", "tests": [ - "assert.strictEqual(euler15(), 137846528820, 'message: \u003ccode\u003eeuler15()\u003c/code\u003e should return 137846528820.');" + "assert.strictEqual(euler15(), 137846528820, 'message: euler15() should return 137846528820.');" ], "solutions": [], "translations": {}, @@ -516,7 +519,7 @@ "type": "bonfire", "title": "Problem 16: Power digit sum", "tests": [ - "assert.strictEqual(euler16(), 1366, 'message: \u003ccode\u003eeuler16()\u003c/code\u003e should return 1366.');" + "assert.strictEqual(euler16(), 1366, 'message: euler16() should return 1366.');" ], "solutions": [], "translations": {}, @@ -539,7 +542,7 @@ "type": "bonfire", "title": "Problem 17: Number letter counts", "tests": [ - "assert.strictEqual(euler17(), 21124, 'message: \u003ccode\u003eeuler17()\u003c/code\u003e should return 21124.');" + "assert.strictEqual(euler17(), 21124, 'message: euler17() should return 21124.');" ], "solutions": [], "translations": {}, @@ -563,7 +566,7 @@ "type": "bonfire", "title": "Problem 18: Maximum path sum I", "tests": [ - "assert.strictEqual(euler18(), 1074, 'message: \u003ccode\u003eeuler18()\u003c/code\u003e should return 1074.');" + "assert.strictEqual(euler18(), 1074, 'message: euler18() should return 1074.');" ], "solutions": [], "translations": {}, @@ -606,7 +609,7 @@ "type": "bonfire", "title": "Problem 19: Counting Sundays", "tests": [ - "assert.strictEqual(euler19(), 171, 'message: \u003ccode\u003eeuler19()\u003c/code\u003e should return 171.');" + "assert.strictEqual(euler19(), 171, 'message: euler19() should return 171.');" ], "solutions": [], "translations": {}, @@ -665,7 +668,7 @@ "type": "bonfire", "title": "Problem 21: Amicable numbers", "tests": [ - "assert.strictEqual(euler21(), 31626, 'message: \u003ccode\u003eeuler21()\u003c/code\u003e should return 31626.');" + "assert.strictEqual(euler21(), 31626, 'message: euler21() should return 31626.');" ], "solutions": [], "translations": {}, @@ -690,7 +693,7 @@ "type": "bonfire", "title": "Problem 22: Names scores", "tests": [ - "assert.strictEqual(euler22(), 871198282, 'message: \u003ccode\u003eeuler22()\u003c/code\u003e should return 871198282.');" + "assert.strictEqual(euler22(), 871198282, 'message: euler22() should return 871198282.');" ], "solutions": [], "translations": {}, @@ -714,7 +717,7 @@ "type": "bonfire", "title": "Problem 23: Non-abundant sums", "tests": [ - "assert.strictEqual(euler23(), 4179871, 'message: \u003ccode\u003eeuler23()\u003c/code\u003e should return 4179871.');" + "assert.strictEqual(euler23(), 4179871, 'message: euler23() should return 4179871.');" ], "solutions": [], "translations": {}, @@ -740,7 +743,7 @@ "type": "bonfire", "title": "Problem 24: Lexicographic permutations", "tests": [ - "assert.strictEqual(euler24(), 2783915460, 'message: \u003ccode\u003eeuler24()\u003c/code\u003e should return 2783915460.');" + "assert.strictEqual(euler24(), 2783915460, 'message: euler24() should return 2783915460.');" ], "solutions": [], "translations": {}, @@ -764,7 +767,7 @@ "type": "bonfire", "title": "Problem 25: 1000-digit Fibonacci number", "tests": [ - "assert.strictEqual(euler25(), 4782, 'message: \u003ccode\u003eeuler25()\u003c/code\u003e should return 4782.');" + "assert.strictEqual(euler25(), 4782, 'message: euler25() should return 4782.');" ], "solutions": [], "translations": {}, @@ -802,7 +805,7 @@ "type": "bonfire", "title": "Problem 26: Reciprocal cycles", "tests": [ - "assert.strictEqual(euler26(), 983, 'message: \u003ccode\u003eeuler26()\u003c/code\u003e should return 983.');" + "assert.strictEqual(euler26(), 983, 'message: euler26() should return 983.');" ], "solutions": [], "translations": {}, @@ -828,7 +831,7 @@ "1/10= 0.1", "", "Where 0.1(6) means 0.166666..., and has a 1-digit recurring cycle. It can be seen that 1/7 has a 6-digit recurring cycle.", - "Find the value of d \u003c 1000 for which 1/d contains the longest recurring cycle in its decimal fraction part." + "Find the value of d < 1000 for which 1/d contains the longest recurring cycle in its decimal fraction part." ] }, { @@ -837,7 +840,7 @@ "type": "bonfire", "title": "Problem 27: Quadratic primes", "tests": [ - "assert.strictEqual(euler27(), -59231, 'message: \u003ccode\u003eeuler27()\u003c/code\u003e should return -59231.');" + "assert.strictEqual(euler27(), -59231, 'message: euler27() should return -59231.');" ], "solutions": [], "translations": {}, @@ -856,7 +859,7 @@ "The incredible formula $n^2 - 79n + 1601$ was discovered, which produces 80 primes for the consecutive values $0 \\le n \\le 79$. The product of the coefficients, −79 and 1601, is −126479.", "Considering quadratics of the form:", "", - "$n^2 + an + b$, where $|a| \u003c 1000$ and $|b| \\le 1000$where $|n|$ is the modulus/absolute value of $n$e.g. $|11| = 11$ and $|-4| = 4$", + "$n^2 + an + b$, where $|a| < 1000$ and $|b| \\le 1000$where $|n|$ is the modulus/absolute value of $n$e.g. $|11| = 11$ and $|-4| = 4$", "", "Find the product of the coefficients, $a$ and $b$, for the quadratic expression that produces the maximum number of primes for consecutive values of $n$, starting with $n = 0$." ] @@ -867,7 +870,7 @@ "type": "bonfire", "title": "Problem 28: Number spiral diagonals", "tests": [ - "assert.strictEqual(euler28(), 669171001, 'message: \u003ccode\u003eeuler28()\u003c/code\u003e should return 669171001.');" + "assert.strictEqual(euler28(), 669171001, 'message: euler28() should return 669171001.');" ], "solutions": [], "translations": {}, @@ -895,7 +898,7 @@ "type": "bonfire", "title": "Problem 29: Distinct powers", "tests": [ - "assert.strictEqual(euler29(), 9183, 'message: \u003ccode\u003eeuler29()\u003c/code\u003e should return 9183.');" + "assert.strictEqual(euler29(), 9183, 'message: euler29() should return 9183.');" ], "solutions": [], "translations": {}, @@ -924,7 +927,7 @@ "type": "bonfire", "title": "Problem 30: Digit fifth powers", "tests": [ - "assert.strictEqual(euler30(), 443839, 'message: \u003ccode\u003eeuler30()\u003c/code\u003e should return 443839.');" + "assert.strictEqual(euler30(), 443839, 'message: euler30() should return 443839.');" ], "solutions": [], "translations": {}, @@ -952,7 +955,7 @@ "type": "bonfire", "title": "Problem 31: Coin sums", "tests": [ - "assert.strictEqual(euler31(), 73682, 'message: \u003ccode\u003eeuler31()\u003c/code\u003e should return 73682.');" + "assert.strictEqual(euler31(), 73682, 'message: euler31() should return 73682.');" ], "solutions": [], "translations": {}, @@ -978,7 +981,7 @@ "type": "bonfire", "title": "Problem 32: Pandigital products", "tests": [ - "assert.strictEqual(euler32(), 45228, 'message: \u003ccode\u003eeuler32()\u003c/code\u003e should return 45228.');" + "assert.strictEqual(euler32(), 45228, 'message: euler32() should return 45228.');" ], "solutions": [], "translations": {}, @@ -1006,7 +1009,7 @@ "type": "bonfire", "title": "Problem 33: Digit cancelling fractions", "tests": [ - "assert.strictEqual(euler33(), 100, 'message: \u003ccode\u003eeuler33()\u003c/code\u003e should return 100.');" + "assert.strictEqual(euler33(), 100, 'message: euler33() should return 100.');" ], "solutions": [], "translations": {}, @@ -1031,7 +1034,7 @@ "type": "bonfire", "title": "Problem 34: Digit factorials", "tests": [ - "assert.strictEqual(euler34(), 40730, 'message: \u003ccode\u003eeuler34()\u003c/code\u003e should return 40730.');" + "assert.strictEqual(euler34(), 40730, 'message: euler34() should return 40730.');" ], "solutions": [], "translations": {}, @@ -1055,7 +1058,7 @@ "type": "bonfire", "title": "Problem 35: Circular primes", "tests": [ - "assert.strictEqual(euler35(), 55, 'message: \u003ccode\u003eeuler35()\u003c/code\u003e should return 55.');" + "assert.strictEqual(euler35(), 55, 'message: euler35() should return 55.');" ], "solutions": [], "translations": {}, @@ -1079,7 +1082,7 @@ "type": "bonfire", "title": "Problem 36: Double-base palindromes", "tests": [ - "assert.strictEqual(euler36(), 872187, 'message: \u003ccode\u003eeuler36()\u003c/code\u003e should return 872187.');" + "assert.strictEqual(euler36(), 872187, 'message: euler36() should return 872187.');" ], "solutions": [], "translations": {}, @@ -1103,7 +1106,7 @@ "type": "bonfire", "title": "Problem 37: Truncatable primes", "tests": [ - "assert.strictEqual(euler37(), 748317, 'message: \u003ccode\u003eeuler37()\u003c/code\u003e should return 748317.');" + "assert.strictEqual(euler37(), 748317, 'message: euler37() should return 748317.');" ], "solutions": [], "translations": {}, @@ -1127,7 +1130,7 @@ "type": "bonfire", "title": "Problem 38: Pandigital multiples", "tests": [ - "assert.strictEqual(euler38(), 932718654, 'message: \u003ccode\u003eeuler38()\u003c/code\u003e should return 932718654.');" + "assert.strictEqual(euler38(), 932718654, 'message: euler38() should return 932718654.');" ], "solutions": [], "translations": {}, @@ -1146,7 +1149,7 @@ "192 × 3 = 576", "By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the concatenated product of 192 and (1,2,3)", "The same can be achieved by starting with 9 and multiplying by 1, 2, 3, 4, and 5, giving the pandigital, 918273645, which is the concatenated product of 9 and (1,2,3,4,5).", - "What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, ... , n) where n \u003e 1?" + "What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, ... , n) where n > 1?" ] }, { @@ -1155,7 +1158,7 @@ "type": "bonfire", "title": "Problem 39: Integer right triangles", "tests": [ - "assert.strictEqual(euler39(), 840, 'message: \u003ccode\u003eeuler39()\u003c/code\u003e should return 840.');" + "assert.strictEqual(euler39(), 840, 'message: euler39() should return 840.');" ], "solutions": [], "translations": {}, @@ -1179,7 +1182,7 @@ "type": "bonfire", "title": "Problem 40: Champernowne's constant", "tests": [ - "assert.strictEqual(euler40(), 210, 'message: \u003ccode\u003eeuler40()\u003c/code\u003e should return 210.');" + "assert.strictEqual(euler40(), 210, 'message: euler40() should return 210.');" ], "solutions": [], "translations": {}, @@ -1205,7 +1208,7 @@ "type": "bonfire", "title": "Problem 41: Pandigital prime", "tests": [ - "assert.strictEqual(euler41(), 7652413, 'message: \u003ccode\u003eeuler41()\u003c/code\u003e should return 7652413.');" + "assert.strictEqual(euler41(), 7652413, 'message: euler41() should return 7652413.');" ], "solutions": [], "translations": {}, @@ -1228,7 +1231,7 @@ "type": "bonfire", "title": "Problem 42: Coded triangle numbers", "tests": [ - "assert.strictEqual(euler42(), 162, 'message: \u003ccode\u003eeuler42()\u003c/code\u003e should return 162.');" + "assert.strictEqual(euler42(), 162, 'message: euler42() should return 162.');" ], "solutions": [], "translations": {}, @@ -1253,7 +1256,7 @@ "type": "bonfire", "title": "Problem 43: Sub-string divisibility", "tests": [ - "assert.strictEqual(euler43(), 16695334890, 'message: \u003ccode\u003eeuler43()\u003c/code\u003e should return 16695334890.');" + "assert.strictEqual(euler43(), 16695334890, 'message: euler43() should return 16695334890.');" ], "solutions": [], "translations": {}, @@ -1284,7 +1287,7 @@ "type": "bonfire", "title": "Problem 44: Pentagon numbers", "tests": [ - "assert.strictEqual(euler44(), 5482660, 'message: \u003ccode\u003eeuler44()\u003c/code\u003e should return 5482660.');" + "assert.strictEqual(euler44(), 5482660, 'message: euler44() should return 5482660.');" ], "solutions": [], "translations": {}, @@ -1309,7 +1312,7 @@ "type": "bonfire", "title": "Problem 45: Triangular, pentagonal, and hexagonal", "tests": [ - "assert.strictEqual(euler45(), 1533776805, 'message: \u003ccode\u003eeuler45()\u003c/code\u003e should return 1533776805.');" + "assert.strictEqual(euler45(), 1533776805, 'message: euler45() should return 1533776805.');" ], "solutions": [], "translations": {}, @@ -1348,7 +1351,7 @@ "type": "bonfire", "title": "Problem 46: Goldbach's other conjecture", "tests": [ - "assert.strictEqual(euler46(), 5777, 'message: \u003ccode\u003eeuler46()\u003c/code\u003e should return 5777.');" + "assert.strictEqual(euler46(), 5777, 'message: euler46() should return 5777.');" ], "solutions": [], "translations": {}, @@ -1378,7 +1381,7 @@ "type": "bonfire", "title": "Problem 47: Distinct primes factors", "tests": [ - "assert.strictEqual(euler47(), 134043, 'message: \u003ccode\u003eeuler47()\u003c/code\u003e should return 134043.');" + "assert.strictEqual(euler47(), 134043, 'message: euler47() should return 134043.');" ], "solutions": [], "translations": {}, @@ -1404,7 +1407,7 @@ "type": "bonfire", "title": "Problem 48: Self powers", "tests": [ - "assert.strictEqual(euler48(), 9110846700, 'message: \u003ccode\u003eeuler48()\u003c/code\u003e should return 9110846700.');" + "assert.strictEqual(euler48(), 9110846700, 'message: euler48() should return 9110846700.');" ], "solutions": [], "translations": {}, @@ -1427,7 +1430,7 @@ "type": "bonfire", "title": "Problem 49: Prime permutations", "tests": [ - "assert.strictEqual(euler49(), 296962999629, 'message: \u003ccode\u003eeuler49()\u003c/code\u003e should return 296962999629.');" + "assert.strictEqual(euler49(), 296962999629, 'message: euler49() should return 296962999629.');" ], "solutions": [], "translations": {}, @@ -1451,7 +1454,7 @@ "type": "bonfire", "title": "Problem 50: Consecutive prime sum", "tests": [ - "assert.strictEqual(euler50(), 997651, 'message: \u003ccode\u003eeuler50()\u003c/code\u003e should return 997651.');" + "assert.strictEqual(euler50(), 997651, 'message: euler50() should return 997651.');" ], "solutions": [], "translations": {}, @@ -1477,7 +1480,7 @@ "type": "bonfire", "title": "Problem 51: Prime digit replacements", "tests": [ - "assert.strictEqual(euler51(), 121313, 'message: \u003ccode\u003eeuler51()\u003c/code\u003e should return 121313.');" + "assert.strictEqual(euler51(), 121313, 'message: euler51() should return 121313.');" ], "solutions": [], "translations": {}, @@ -1501,7 +1504,7 @@ "type": "bonfire", "title": "Problem 52: Permuted multiples", "tests": [ - "assert.strictEqual(euler52(), 142857, 'message: \u003ccode\u003eeuler52()\u003c/code\u003e should return 142857.');" + "assert.strictEqual(euler52(), 142857, 'message: euler52() should return 142857.');" ], "solutions": [], "translations": {}, @@ -1524,7 +1527,7 @@ "type": "bonfire", "title": "Problem 53: Combinatoric selections", "tests": [ - "assert.strictEqual(euler53(), 4075, 'message: \u003ccode\u003eeuler53()\u003c/code\u003e should return 4075.');" + "assert.strictEqual(euler53(), 4075, 'message: euler53() should return 4075.');" ], "solutions": [], "translations": {}, @@ -1556,7 +1559,7 @@ "type": "bonfire", "title": "Problem 54: Poker hands", "tests": [ - "assert.strictEqual(euler54(), 376, 'message: \u003ccode\u003eeuler54()\u003c/code\u003e should return 376.');" + "assert.strictEqual(euler54(), 376, 'message: euler54() should return 376.');" ], "solutions": [], "translations": {}, @@ -1601,7 +1604,7 @@ "type": "bonfire", "title": "Problem 55: Lychrel numbers", "tests": [ - "assert.strictEqual(euler55(), 249, 'message: \u003ccode\u003eeuler55()\u003c/code\u003e should return 249.');" + "assert.strictEqual(euler55(), 249, 'message: euler55() should return 249.');" ], "solutions": [], "translations": {}, @@ -1632,7 +1635,7 @@ "type": "bonfire", "title": "Problem 56: Powerful digit sum", "tests": [ - "assert.strictEqual(euler56(), 972, 'message: \u003ccode\u003eeuler56()\u003c/code\u003e should return 972.');" + "assert.strictEqual(euler56(), 972, 'message: euler56() should return 972.');" ], "solutions": [], "translations": {}, @@ -1646,7 +1649,7 @@ ], "description": [ "A googol (10100) is a massive number: one followed by one-hundred zeros; 100100 is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each number is only 1.", - "Considering natural numbers of the form, ab, where a, b \u003c 100, what is the maximum digital sum?" + "Considering natural numbers of the form, ab, where a, b < 100, what is the maximum digital sum?" ] }, { @@ -1655,7 +1658,7 @@ "type": "bonfire", "title": "Problem 57: Square root convergents", "tests": [ - "assert.strictEqual(euler57(), 153, 'message: \u003ccode\u003eeuler57()\u003c/code\u003e should return 153.');" + "assert.strictEqual(euler57(), 153, 'message: euler57() should return 153.');" ], "solutions": [], "translations": {}, @@ -1685,7 +1688,7 @@ "type": "bonfire", "title": "Problem 58: Spiral primes", "tests": [ - "assert.strictEqual(euler58(), 26241, 'message: \u003ccode\u003eeuler58()\u003c/code\u003e should return 26241.');" + "assert.strictEqual(euler58(), 26241, 'message: euler58() should return 26241.');" ], "solutions": [], "translations": {}, @@ -1715,7 +1718,7 @@ "type": "bonfire", "title": "Problem 59: XOR decryption", "tests": [ - "assert.strictEqual(euler59(), 107359, 'message: \u003ccode\u003eeuler59()\u003c/code\u003e should return 107359.');" + "assert.strictEqual(euler59(), 107359, 'message: euler59() should return 107359.');" ], "solutions": [], "translations": {}, @@ -1741,7 +1744,7 @@ "type": "bonfire", "title": "Problem 60: Prime pair sets", "tests": [ - "assert.strictEqual(euler60(), 26033, 'message: \u003ccode\u003eeuler60()\u003c/code\u003e should return 26033.');" + "assert.strictEqual(euler60(), 26033, 'message: euler60() should return 26033.');" ], "solutions": [], "translations": {}, @@ -1764,7 +1767,7 @@ "type": "bonfire", "title": "Problem 61: Cyclical figurate numbers", "tests": [ - "assert.strictEqual(euler61(), 28684, 'message: \u003ccode\u003eeuler61()\u003c/code\u003e should return 28684.');" + "assert.strictEqual(euler61(), 28684, 'message: euler61() should return 28684.');" ], "solutions": [], "translations": {}, @@ -1821,7 +1824,7 @@ "type": "bonfire", "title": "Problem 62: Cubic permutations", "tests": [ - "assert.strictEqual(euler62(), 127035954683, 'message: \u003ccode\u003eeuler62()\u003c/code\u003e should return 127035954683.');" + "assert.strictEqual(euler62(), 127035954683, 'message: euler62() should return 127035954683.');" ], "solutions": [], "translations": {}, @@ -1844,7 +1847,7 @@ "type": "bonfire", "title": "Problem 63: Powerful digit counts", "tests": [ - "assert.strictEqual(euler63(), 49, 'message: \u003ccode\u003eeuler63()\u003c/code\u003e should return 49.');" + "assert.strictEqual(euler63(), 49, 'message: euler63() should return 49.');" ], "solutions": [], "translations": {}, @@ -1867,7 +1870,7 @@ "type": "bonfire", "title": "Problem 64: Odd period square roots", "tests": [ - "assert.strictEqual(euler64(), 1322, 'message: \u003ccode\u003eeuler64()\u003c/code\u003e should return 1322.');" + "assert.strictEqual(euler64(), 1322, 'message: euler64() should return 1322.');" ], "solutions": [], "translations": {}, @@ -2012,7 +2015,7 @@ "type": "bonfire", "title": "Problem 65: Convergents of e", "tests": [ - "assert.strictEqual(euler65(), 272, 'message: \u003ccode\u003eeuler65()\u003c/code\u003e should return 272.');" + "assert.strictEqual(euler65(), 272, 'message: euler65() should return 272.');" ], "solutions": [], "translations": {}, @@ -2123,7 +2126,7 @@ "type": "bonfire", "title": "Problem 66: Diophantine equation", "tests": [ - "assert.strictEqual(euler66(), 661, 'message: \u003ccode\u003eeuler66()\u003c/code\u003e should return 661.');" + "assert.strictEqual(euler66(), 661, 'message: euler66() should return 661.');" ], "solutions": [], "translations": {}, @@ -2155,7 +2158,7 @@ "type": "bonfire", "title": "Problem 67: Maximum path sum II", "tests": [ - "assert.strictEqual(euler67(), 7273, 'message: \u003ccode\u003eeuler67()\u003c/code\u003e should return 7273.');" + "assert.strictEqual(euler67(), 7273, 'message: euler67() should return 7273.');" ], "solutions": [], "translations": {}, @@ -2183,7 +2186,7 @@ "type": "bonfire", "title": "Problem 68: Magic 5-gon ring", "tests": [ - "assert.strictEqual(euler68(), 6531031914842725, 'message: \u003ccode\u003eeuler68()\u003c/code\u003e should return 6531031914842725.');" + "assert.strictEqual(euler68(), 6531031914842725, 'message: euler68() should return 6531031914842725.');" ], "solutions": [], "translations": {}, @@ -2222,7 +2225,7 @@ "type": "bonfire", "title": "Problem 69: Totient maximum", "tests": [ - "assert.strictEqual(euler69(), 510510, 'message: \u003ccode\u003eeuler69()\u003c/code\u003e should return 510510.');" + "assert.strictEqual(euler69(), 510510, 'message: euler69() should return 510510.');" ], "solutions": [], "translations": {}, @@ -2288,7 +2291,7 @@ "type": "bonfire", "title": "Problem 70: Totient permutation", "tests": [ - "assert.strictEqual(euler70(), 8319823, 'message: \u003ccode\u003eeuler70()\u003c/code\u003e should return 8319823.');" + "assert.strictEqual(euler70(), 8319823, 'message: euler70() should return 8319823.');" ], "solutions": [], "translations": {}, @@ -2303,7 +2306,7 @@ "description": [ "Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the number of positive numbers less than or equal to n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6.The number 1 is considered to be relatively prime to every positive number, so φ(1)=1. ", "Interestingly, φ(87109)=79180, and it can be seen that 87109 is a permutation of 79180.", - "Find the value of n, 1 \u003c n \u003c 107, for which φ(n) is a permutation of n and the ratio n/φ(n) produces a minimum." + "Find the value of n, 1 < n < 107, for which φ(n) is a permutation of n and the ratio n/φ(n) produces a minimum." ] }, { @@ -2312,7 +2315,7 @@ "type": "bonfire", "title": "Problem 71: Ordered fractions", "tests": [ - "assert.strictEqual(euler71(), 428570, 'message: \u003ccode\u003eeuler71()\u003c/code\u003e should return 428570.');" + "assert.strictEqual(euler71(), 428570, 'message: euler71() should return 428570.');" ], "solutions": [], "translations": {}, @@ -2325,7 +2328,7 @@ "euler71();" ], "description": [ - "Consider the fraction, n/d, where n and d are positive integers. If n\u003cd and HCF(n,d)=1, it is called a reduced proper fraction.", + "Consider the fraction, n/d, where n and d are positive integers. If neuler72() should return 303963552391.');" ], "solutions": [], "translations": {}, @@ -2351,7 +2354,7 @@ "euler72();" ], "description": [ - "Consider the fraction, n/d, where n and d are positive integers. If n\u003cd and HCF(n,d)=1, it is called a reduced proper fraction.", + "Consider the fraction, n/d, where n and d are positive integers. If neuler73() should return 7295372.');" ], "solutions": [], "translations": {}, @@ -2377,7 +2380,7 @@ "euler73();" ], "description": [ - "Consider the fraction, n/d, where n and d are positive integers. If n\u003cd and HCF(n,d)=1, it is called a reduced proper fraction.", + "Consider the fraction, n/d, where n and d are positive integers. If neuler74() should return 402.');" ], "solutions": [], "translations": {}, @@ -2423,7 +2426,7 @@ "type": "bonfire", "title": "Problem 75: Singular integer right triangles", "tests": [ - "assert.strictEqual(euler75(), 161667, 'message: \u003ccode\u003eeuler75()\u003c/code\u003e should return 161667.');" + "assert.strictEqual(euler75(), 161667, 'message: euler75() should return 161667.');" ], "solutions": [], "translations": {}, @@ -2449,7 +2452,7 @@ "type": "bonfire", "title": "Problem 76: Counting summations", "tests": [ - "assert.strictEqual(euler76(), 190569291, 'message: \u003ccode\u003eeuler76()\u003c/code\u003e should return 190569291.');" + "assert.strictEqual(euler76(), 190569291, 'message: euler76() should return 190569291.');" ], "solutions": [], "translations": {}, @@ -2478,7 +2481,7 @@ "type": "bonfire", "title": "Problem 77: Prime summations", "tests": [ - "assert.strictEqual(euler77(), 71, 'message: \u003ccode\u003eeuler77()\u003c/code\u003e should return 71.');" + "assert.strictEqual(euler77(), 71, 'message: euler77() should return 71.');" ], "solutions": [], "translations": {}, @@ -2506,7 +2509,7 @@ "type": "bonfire", "title": "Problem 78: Coin partitions", "tests": [ - "assert.strictEqual(euler78(), 55374, 'message: \u003ccode\u003eeuler78()\u003c/code\u003e should return 55374.');" + "assert.strictEqual(euler78(), 55374, 'message: euler78() should return 55374.');" ], "solutions": [], "translations": {}, @@ -2538,7 +2541,7 @@ "type": "bonfire", "title": "Problem 79: Passcode derivation", "tests": [ - "assert.strictEqual(euler79(), 73162890, 'message: \u003ccode\u003eeuler79()\u003c/code\u003e should return 73162890.');" + "assert.strictEqual(euler79(), 73162890, 'message: euler79() should return 73162890.');" ], "solutions": [], "translations": {}, @@ -2562,7 +2565,7 @@ "type": "bonfire", "title": "Problem 80: Square root digital expansion", "tests": [ - "assert.strictEqual(euler80(), 40886, 'message: \u003ccode\u003eeuler80()\u003c/code\u003e should return 40886.');" + "assert.strictEqual(euler80(), 40886, 'message: euler80() should return 40886.');" ], "solutions": [], "translations": {}, @@ -2586,7 +2589,7 @@ "type": "bonfire", "title": "Problem 81: Path sum: two ways", "tests": [ - "assert.strictEqual(euler81(), 427337, 'message: \u003ccode\u003eeuler81()\u003c/code\u003e should return 427337.');" + "assert.strictEqual(euler81(), 427337, 'message: euler81() should return 427337.');" ], "solutions": [], "translations": {}, @@ -2603,11 +2606,11 @@ "", "$$", "\\begin{pmatrix}", - "\\color{red}{131} \u0026 673 \u0026 234 \u0026 103 \u0026 18\\\\", - "\\color{red}{201} \u0026 \\color{red}{96} \u0026 \\color{red}{342} \u0026 965 \u0026 150\\\\", - "630 \u0026 803 \u0026 \\color{red}{746} \u0026 \\color{red}{422} \u0026 111\\\\", - "537 \u0026 699 \u0026 497 \u0026 \\color{red}{121} \u0026 956\\\\", - "805 \u0026 732 \u0026 524 \u0026 \\color{red}{37} \u0026 \\color{red}{331}", + "\\color{red}{131} & 673 & 234 & 103 & 18\\\\", + "\\color{red}{201} & \\color{red}{96} & \\color{red}{342} & 965 & 150\\\\", + "630 & 803 & \\color{red}{746} & \\color{red}{422} & 111\\\\", + "537 & 699 & 497 & \\color{red}{121} & 956\\\\", + "805 & 732 & 524 & \\color{red}{37} & \\color{red}{331}", "\\end{pmatrix}", "$$", "", @@ -2620,7 +2623,7 @@ "type": "bonfire", "title": "Problem 82: Path sum: three ways", "tests": [ - "assert.strictEqual(euler82(), 260324, 'message: \u003ccode\u003eeuler82()\u003c/code\u003e should return 260324.');" + "assert.strictEqual(euler82(), 260324, 'message: euler82() should return 260324.');" ], "solutions": [], "translations": {}, @@ -2638,11 +2641,11 @@ "", "$$", "\\begin{pmatrix}", - "131 \u0026 673 \u0026 \\color{red}{234} \u0026 \\color{red}{103} \u0026 \\color{red}{18}\\\\", - "\\color{red}{201} \u0026 \\color{red}{96} \u0026 \\color{red}{342} \u0026 965 \u0026 150\\\\", - "630 \u0026 803 \u0026 746 \u0026 422 \u0026 111\\\\", - "537 \u0026 699 \u0026 497 \u0026 121 \u0026 956\\\\", - "805 \u0026 732 \u0026 524 \u0026 37 \u0026 331", + "131 & 673 & \\color{red}{234} & \\color{red}{103} & \\color{red}{18}\\\\", + "\\color{red}{201} & \\color{red}{96} & \\color{red}{342} & 965 & 150\\\\", + "630 & 803 & 746 & 422 & 111\\\\", + "537 & 699 & 497 & 121 & 956\\\\", + "805 & 732 & 524 & 37 & 331", "\\end{pmatrix}", "$$", "", @@ -2655,7 +2658,7 @@ "type": "bonfire", "title": "Problem 83: Path sum: four ways", "tests": [ - "assert.strictEqual(euler83(), 425185, 'message: \u003ccode\u003eeuler83()\u003c/code\u003e should return 425185.');" + "assert.strictEqual(euler83(), 425185, 'message: euler83() should return 425185.');" ], "solutions": [], "translations": {}, @@ -2673,11 +2676,11 @@ "", "$$", "\\begin{pmatrix}", - "\\color{red}{131} \u0026 673 \u0026 \\color{red}{234} \u0026 \\color{red}{103} \u0026 \\color{red}{18}\\\\", - "\\color{red}{201} \u0026 \\color{red}{96} \u0026 \\color{red}{342} \u0026 965 \u0026 \\color{red}{150}\\\\", - "630 \u0026 803 \u0026 746 \u0026 \\color{red}{422} \u0026 \\color{red}{111}\\\\", - "537 \u0026 699 \u0026 497 \u0026 \\color{red}{121} \u0026 956\\\\", - "805 \u0026 732 \u0026 524 \u0026 \\color{red}{37} \u0026 \\color{red}{331}", + "\\color{red}{131} & 673 & \\color{red}{234} & \\color{red}{103} & \\color{red}{18}\\\\", + "\\color{red}{201} & \\color{red}{96} & \\color{red}{342} & 965 & \\color{red}{150}\\\\", + "630 & 803 & 746 & \\color{red}{422} & \\color{red}{111}\\\\", + "537 & 699 & 497 & \\color{red}{121} & 956\\\\", + "805 & 732 & 524 & \\color{red}{37} & \\color{red}{331}", "\\end{pmatrix}", "$$", "", @@ -2691,7 +2694,7 @@ "type": "bonfire", "title": "Problem 84: Monopoly odds", "tests": [ - "assert.strictEqual(euler84(), 101524, 'message: \u003ccode\u003eeuler84()\u003c/code\u003e should return 101524.');" + "assert.strictEqual(euler84(), 101524, 'message: euler84() should return 101524.');" ], "solutions": [], "translations": {}, @@ -2787,7 +2790,7 @@ "type": "bonfire", "title": "Problem 85: Counting rectangles", "tests": [ - "assert.strictEqual(euler85(), 2772, 'message: \u003ccode\u003eeuler85()\u003c/code\u003e should return 2772.');" + "assert.strictEqual(euler85(), 2772, 'message: euler85() should return 2772.');" ], "solutions": [], "translations": {}, @@ -2812,7 +2815,7 @@ "type": "bonfire", "title": "Problem 86: Cuboid route", "tests": [ - "assert.strictEqual(euler86(), 1818, 'message: \u003ccode\u003eeuler86()\u003c/code\u003e should return 1818.');" + "assert.strictEqual(euler86(), 1818, 'message: euler86() should return 1818.');" ], "solutions": [], "translations": {}, @@ -2839,7 +2842,7 @@ "type": "bonfire", "title": "Problem 87: Prime power triples", "tests": [ - "assert.strictEqual(euler87(), 1097343, 'message: \u003ccode\u003eeuler87()\u003c/code\u003e should return 1097343.');" + "assert.strictEqual(euler87(), 1097343, 'message: euler87() should return 1097343.');" ], "solutions": [], "translations": {}, @@ -2866,7 +2869,7 @@ "type": "bonfire", "title": "Problem 88: Product-sum numbers", "tests": [ - "assert.strictEqual(euler88(), 7587457, 'message: \u003ccode\u003eeuler88()\u003c/code\u003e should return 7587457.');" + "assert.strictEqual(euler88(), 7587457, 'message: euler88() should return 7587457.');" ], "solutions": [], "translations": {}, @@ -2894,7 +2897,7 @@ "type": "bonfire", "title": "Problem 89: Roman numerals", "tests": [ - "assert.strictEqual(euler89(), 743, 'message: \u003ccode\u003eeuler89()\u003c/code\u003e should return 743.');" + "assert.strictEqual(euler89(), 743, 'message: euler89() should return 743.');" ], "solutions": [], "translations": {}, @@ -2927,7 +2930,7 @@ "type": "bonfire", "title": "Problem 90: Cube digit pairs", "tests": [ - "assert.strictEqual(euler90(), 1217, 'message: \u003ccode\u003eeuler90()\u003c/code\u003e should return 1217.');" + "assert.strictEqual(euler90(), 1217, 'message: euler90() should return 1217.');" ], "solutions": [], "translations": {}, @@ -2969,7 +2972,7 @@ "type": "bonfire", "title": "Problem 91: Right triangles with integer coordinates", "tests": [ - "assert.strictEqual(euler91(), 14234, 'message: \u003ccode\u003eeuler91()\u003c/code\u003e should return 14234.');" + "assert.strictEqual(euler91(), 14234, 'message: euler91() should return 14234.');" ], "solutions": [], "translations": {}, @@ -3001,7 +3004,7 @@ "type": "bonfire", "title": "Problem 92: Square digit chains", "tests": [ - "assert.strictEqual(euler92(), 8581146, 'message: \u003ccode\u003eeuler92()\u003c/code\u003e should return 8581146.');" + "assert.strictEqual(euler92(), 8581146, 'message: euler92() should return 8581146.');" ], "solutions": [], "translations": {}, @@ -3028,7 +3031,7 @@ "type": "bonfire", "title": "Problem 93: Arithmetic expressions", "tests": [ - "assert.strictEqual(euler93(), 1258, 'message: \u003ccode\u003eeuler93()\u003c/code\u003e should return 1258.');" + "assert.strictEqual(euler93(), 1258, 'message: euler93() should return 1258.');" ], "solutions": [], "translations": {}, @@ -3049,7 +3052,7 @@ "36 = 3 * 4 * (2 + 1)", "Note that concatenations of the digits, like 12 + 34, are not allowed.", "Using the set, {1, 2, 3, 4}, it is possible to obtain thirty-one different target numbers of which 36 is the maximum, and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number.", - "Find the set of four distinct digits, a \u003c b \u003c c \u003c d, for which the longest set of consecutive positive integers, 1 to n, can be obtained, giving your answer as a string: abcd." + "Find the set of four distinct digits, a < b < c < d, for which the longest set of consecutive positive integers, 1 to n, can be obtained, giving your answer as a string: abcd." ] }, { @@ -3058,7 +3061,7 @@ "type": "bonfire", "title": "Problem 94: Almost equilateral triangles", "tests": [ - "assert.strictEqual(euler94(), 518408346, 'message: \u003ccode\u003eeuler94()\u003c/code\u003e should return 518408346.');" + "assert.strictEqual(euler94(), 518408346, 'message: euler94() should return 518408346.');" ], "solutions": [], "translations": {}, @@ -3082,7 +3085,7 @@ "type": "bonfire", "title": "Problem 95: Amicable chains", "tests": [ - "assert.strictEqual(euler95(), 14316, 'message: \u003ccode\u003eeuler95()\u003c/code\u003e should return 14316.');" + "assert.strictEqual(euler95(), 14316, 'message: euler95() should return 14316.');" ], "solutions": [], "translations": {}, @@ -3109,7 +3112,7 @@ "type": "bonfire", "title": "Problem 96: Su Doku", "tests": [ - "assert.strictEqual(euler96(), 24702, 'message: \u003ccode\u003eeuler96()\u003c/code\u003e should return 24702.');" + "assert.strictEqual(euler96(), 24702, 'message: euler96() should return 24702.');" ], "solutions": [], "translations": {}, @@ -3159,7 +3162,7 @@ "type": "bonfire", "title": "Problem 97: Large non-Mersenne prime", "tests": [ - "assert.strictEqual(euler97(), 8739992577, 'message: \u003ccode\u003eeuler97()\u003c/code\u003e should return 8739992577.');" + "assert.strictEqual(euler97(), 8739992577, 'message: euler97() should return 8739992577.');" ], "solutions": [], "translations": {}, @@ -3183,7 +3186,7 @@ "type": "bonfire", "title": "Problem 98: Anagramic squares", "tests": [ - "assert.strictEqual(euler98(), 18769, 'message: \u003ccode\u003eeuler98()\u003c/code\u003e should return 18769.');" + "assert.strictEqual(euler98(), 18769, 'message: euler98() should return 18769.');" ], "solutions": [], "translations": {}, @@ -3208,7 +3211,7 @@ "type": "bonfire", "title": "Problem 99: Largest exponential", "tests": [ - "assert.strictEqual(euler99(), 709, 'message: \u003ccode\u003eeuler99()\u003c/code\u003e should return 709.');" + "assert.strictEqual(euler99(), 709, 'message: euler99() should return 709.');" ], "solutions": [], "translations": {}, @@ -3221,8 +3224,8 @@ "euler99();" ], "description": [ - "Comparing two numbers written in index form like 211 and 37 is not difficult, as any calculator would confirm that 211 = 2048 \u003c 37 = 2187.", - "However, confirming that 632382518061 \u003e 519432525806 would be much more difficult, as both numbers contain over three million digits.", + "Comparing two numbers written in index form like 211 and 37 is not difficult, as any calculator would confirm that 211 = 2048 < 37 = 2187.", + "However, confirming that 632382518061 > 519432525806 would be much more difficult, as both numbers contain over three million digits.", "Using base_exp.txt (right click and 'Save Link/Target As...'), a 22K text file containing one thousand lines with a base/exponent pair on each line, determine which line number has the greatest numerical value.", "NOTE: The first two lines in the file represent the numbers in the example given above." ] @@ -3233,7 +3236,7 @@ "type": "bonfire", "title": "Problem 100: Arranged probability", "tests": [ - "assert.strictEqual(euler100(), 756872327473, 'message: \u003ccode\u003eeuler100()\u003c/code\u003e should return 756872327473.');" + "assert.strictEqual(euler100(), 756872327473, 'message: euler100() should return 756872327473.');" ], "solutions": [], "translations": {}, @@ -3257,7 +3260,7 @@ "type": "bonfire", "title": "Problem 101: Optimum polynomial", "tests": [ - "assert.strictEqual(euler101(), 37076114526, 'message: \u003ccode\u003eeuler101()\u003c/code\u003e should return 37076114526.');" + "assert.strictEqual(euler101(), 37076114526, 'message: euler101() should return 37076114526.');" ], "solutions": [], "translations": {}, @@ -3299,7 +3302,7 @@ "type": "bonfire", "title": "Problem 102: Triangle containment", "tests": [ - "assert.strictEqual(euler102(), 228, 'message: \u003ccode\u003eeuler102()\u003c/code\u003e should return 228.');" + "assert.strictEqual(euler102(), 228, 'message: euler102() should return 228.');" ], "solutions": [], "translations": {}, @@ -3327,7 +3330,7 @@ "type": "bonfire", "title": "Problem 103: Special subset sums: optimum", "tests": [ - "assert.strictEqual(euler103(), 20313839404245, 'message: \u003ccode\u003eeuler103()\u003c/code\u003e should return 20313839404245.');" + "assert.strictEqual(euler103(), 20313839404245, 'message: euler103() should return 20313839404245.');" ], "solutions": [], "translations": {}, @@ -3342,7 +3345,7 @@ "description": [ "Let S(A) represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the following properties are true:", "S(B) ≠ S(C); that is, sums of subsets cannot be equal.", - "If B contains more elements than C then S(B) \u003e S(C).", + "If B contains more elements than C then S(B) > S(C).", "If S(A) is minimised for a given n, we shall call it an optimum special sum set. The first five optimum special sum sets are given below.", "n = 1: {1}n = 2: {1, 2}n = 3: {2, 3, 4}n = 4: {3, 5, 6, 7}n = 5: {6, 9, 11, 12, 13}", "It seems that for a given optimum set, A = {a1, a2, ... , an}, the next optimum set is of the form B = {b, a1+b, a2+b, ... ,an+b}, where b is the \"middle\" element on the previous row.", @@ -3357,7 +3360,7 @@ "type": "bonfire", "title": "Problem 104: Pandigital Fibonacci ends", "tests": [ - "assert.strictEqual(euler104(), 329468, 'message: \u003ccode\u003eeuler104()\u003c/code\u003e should return 329468.');" + "assert.strictEqual(euler104(), 329468, 'message: euler104() should return 329468.');" ], "solutions": [], "translations": {}, @@ -3382,7 +3385,7 @@ "type": "bonfire", "title": "Problem 105: Special subset sums: testing", "tests": [ - "assert.strictEqual(euler105(), 73702, 'message: \u003ccode\u003eeuler105()\u003c/code\u003e should return 73702.');" + "assert.strictEqual(euler105(), 73702, 'message: euler105() should return 73702.');" ], "solutions": [], "translations": {}, @@ -3397,7 +3400,7 @@ "description": [ "Let S(A) represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the following properties are true:", "S(B) ≠ S(C); that is, sums of subsets cannot be equal.", - "If B contains more elements than C then S(B) \u003e S(C).", + "If B contains more elements than C then S(B) > S(C).", "For example, {81, 88, 75, 42, 87, 84, 86, 65} is not a special sum set because 65 + 87 + 88 = 75 + 81 + 84, whereas {157, 150, 164, 119, 79, 159, 161, 139, 158} satisfies both rules for all possible subset pair combinations and S(A) = 1286.", "Using sets.txt (right click and \"Save Link/Target As...\"), a 4K text file with one-hundred sets containing seven to twelve elements (the two examples given above are the first two sets in the file), identify all the special sum sets, A1, A2, ..., Ak, and find the value of S(A1) + S(A2) + ... + S(Ak).", "NOTE: This problem is related to Problem 103 and Problem 106." @@ -3409,7 +3412,7 @@ "type": "bonfire", "title": "Problem 106: Special subset sums: meta-testing", "tests": [ - "assert.strictEqual(euler106(), 21384, 'message: \u003ccode\u003eeuler106()\u003c/code\u003e should return 21384.');" + "assert.strictEqual(euler106(), 21384, 'message: euler106() should return 21384.');" ], "solutions": [], "translations": {}, @@ -3424,7 +3427,7 @@ "description": [ "Let S(A) represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the following properties are true:", "S(B) ≠ S(C); that is, sums of subsets cannot be equal.", - "If B contains more elements than C then S(B) \u003e S(C).", + "If B contains more elements than C then S(B) > S(C).", "For this problem we shall assume that a given set contains n strictly increasing elements and it already satisfies the second rule.", "Surprisingly, out of the 25 possible subset pairs that can be obtained from a set for which n = 4, only 1 of these pairs need to be tested for equality (first rule). Similarly, when n = 7, only 70 out of the 966 subset pairs need to be tested.", "For n = 12, how many of the 261625 subset pairs that can be obtained need to be tested for equality?", @@ -3437,7 +3440,7 @@ "type": "bonfire", "title": "Problem 107: Minimal network", "tests": [ - "assert.strictEqual(euler107(), 259679, 'message: \u003ccode\u003eeuler107()\u003c/code\u003e should return 259679.');" + "assert.strictEqual(euler107(), 259679, 'message: euler107() should return 259679.');" ], "solutions": [], "translations": {}, @@ -3474,7 +3477,7 @@ "type": "bonfire", "title": "Problem 108: About Project Euler", "tests": [ - "assert.strictEqual(euler108(), 180180, 'message: \u003ccode\u003eeuler108()\u003c/code\u003e should return 180180.');" + "assert.strictEqual(euler108(), 180180, 'message: euler108() should return 180180.');" ], "solutions": [], "translations": {}, @@ -3496,7 +3499,7 @@ "type": "bonfire", "title": "Problem 109: Darts", "tests": [ - "assert.strictEqual(euler109(), 38182, 'message: \u003ccode\u003eeuler109()\u003c/code\u003e should return 38182.');" + "assert.strictEqual(euler109(), 38182, 'message: euler109() should return 38182.');" ], "solutions": [], "translations": {}, @@ -3564,7 +3567,7 @@ "type": "bonfire", "title": "Problem 110: About Project Euler", "tests": [ - "assert.strictEqual(euler110(), 9350130049860600, 'message: \u003ccode\u003eeuler110()\u003c/code\u003e should return 9350130049860600.');" + "assert.strictEqual(euler110(), 9350130049860600, 'message: euler110() should return 9350130049860600.');" ], "solutions": [], "translations": {}, @@ -3586,7 +3589,7 @@ "type": "bonfire", "title": "Problem 111: Primes with runs", "tests": [ - "assert.strictEqual(euler111(), 612407567715, 'message: \u003ccode\u003eeuler111()\u003c/code\u003e should return 612407567715.');" + "assert.strictEqual(euler111(), 612407567715, 'message: euler111() should return 612407567715.');" ], "solutions": [], "translations": {}, @@ -3660,7 +3663,7 @@ "type": "bonfire", "title": "Problem 112: Bouncy numbers", "tests": [ - "assert.strictEqual(euler112(), 1587000, 'message: \u003ccode\u003eeuler112()\u003c/code\u003e should return 1587000.');" + "assert.strictEqual(euler112(), 1587000, 'message: euler112() should return 1587000.');" ], "solutions": [], "translations": {}, @@ -3687,7 +3690,7 @@ "type": "bonfire", "title": "Problem 113: Non-bouncy numbers", "tests": [ - "assert.strictEqual(euler113(), 51161058134250, 'message: \u003ccode\u003eeuler113()\u003c/code\u003e should return 51161058134250.');" + "assert.strictEqual(euler113(), 51161058134250, 'message: euler113() should return 51161058134250.');" ], "solutions": [], "translations": {}, @@ -3713,7 +3716,7 @@ "type": "bonfire", "title": "Problem 114: Counting block combinations I", "tests": [ - "assert.strictEqual(euler114(), 16475640049, 'message: \u003ccode\u003eeuler114()\u003c/code\u003e should return 16475640049.');" + "assert.strictEqual(euler114(), 16475640049, 'message: euler114() should return 16475640049.');" ], "solutions": [], "translations": {}, @@ -3838,7 +3841,7 @@ "type": "bonfire", "title": "Problem 115: Counting block combinations II", "tests": [ - "assert.strictEqual(euler115(), 168, 'message: \u003ccode\u003eeuler115()\u003c/code\u003e should return 168.');" + "assert.strictEqual(euler115(), 168, 'message: euler115() should return 168.');" ], "solutions": [], "translations": {}, @@ -3866,7 +3869,7 @@ "type": "bonfire", "title": "Problem 116: Red, green or blue tiles", "tests": [ - "assert.strictEqual(euler116(), 20492570929, 'message: \u003ccode\u003eeuler116()\u003c/code\u003e should return 20492570929.');" + "assert.strictEqual(euler116(), 20492570929, 'message: euler116() should return 20492570929.');" ], "solutions": [], "translations": {}, @@ -3961,7 +3964,7 @@ "type": "bonfire", "title": "Problem 117: Red, green, and blue tiles", "tests": [ - "assert.strictEqual(euler117(), 100808458960497, 'message: \u003ccode\u003eeuler117()\u003c/code\u003e should return 100808458960497.');" + "assert.strictEqual(euler117(), 100808458960497, 'message: euler117() should return 100808458960497.');" ], "solutions": [], "translations": {}, @@ -4064,7 +4067,7 @@ "type": "bonfire", "title": "Problem 118: Pandigital prime sets", "tests": [ - "assert.strictEqual(euler118(), 44680, 'message: \u003ccode\u003eeuler118()\u003c/code\u003e should return 44680.');" + "assert.strictEqual(euler118(), 44680, 'message: euler118() should return 44680.');" ], "solutions": [], "translations": {}, @@ -4087,7 +4090,7 @@ "type": "bonfire", "title": "Problem 119: Digit power sum", "tests": [ - "assert.strictEqual(euler119(), 248155780267521, 'message: \u003ccode\u003eeuler119()\u003c/code\u003e should return 248155780267521.');" + "assert.strictEqual(euler119(), 248155780267521, 'message: euler119() should return 248155780267521.');" ], "solutions": [], "translations": {}, @@ -4112,7 +4115,7 @@ "type": "bonfire", "title": "Problem 120: Square remainders", "tests": [ - "assert.strictEqual(euler120(), 333082500, 'message: \u003ccode\u003eeuler120()\u003c/code\u003e should return 333082500.');" + "assert.strictEqual(euler120(), 333082500, 'message: euler120() should return 333082500.');" ], "solutions": [], "translations": {}, @@ -4136,7 +4139,7 @@ "type": "bonfire", "title": "Problem 121: Disc game prize fund", "tests": [ - "assert.strictEqual(euler121(), 2269, 'message: \u003ccode\u003eeuler121()\u003c/code\u003e should return 2269.');" + "assert.strictEqual(euler121(), 2269, 'message: euler121() should return 2269.');" ], "solutions": [], "translations": {}, @@ -4161,7 +4164,7 @@ "type": "bonfire", "title": "Problem 122: Efficient exponentiation", "tests": [ - "assert.strictEqual(euler122(), 1582, 'message: \u003ccode\u003eeuler122()\u003c/code\u003e should return 1582.');" + "assert.strictEqual(euler122(), 1582, 'message: euler122() should return 1582.');" ], "solutions": [], "translations": {}, @@ -4190,7 +4193,7 @@ "type": "bonfire", "title": "Problem 123: Prime square remainders", "tests": [ - "assert.strictEqual(euler123(), 21035, 'message: \u003ccode\u003eeuler123()\u003c/code\u003e should return 21035.');" + "assert.strictEqual(euler123(), 21035, 'message: euler123() should return 21035.');" ], "solutions": [], "translations": {}, @@ -4215,7 +4218,7 @@ "type": "bonfire", "title": "Problem 124: Ordered radicals", "tests": [ - "assert.strictEqual(euler124(), 21417, 'message: \u003ccode\u003eeuler124()\u003c/code\u003e should return 21417.');" + "assert.strictEqual(euler124(), 21417, 'message: euler124() should return 21417.');" ], "solutions": [], "translations": {}, @@ -4279,7 +4282,7 @@ "type": "bonfire", "title": "Problem 125: Palindromic sums", "tests": [ - "assert.strictEqual(euler125(), 2906969179, 'message: \u003ccode\u003eeuler125()\u003c/code\u003e should return 2906969179.');" + "assert.strictEqual(euler125(), 2906969179, 'message: euler125() should return 2906969179.');" ], "solutions": [], "translations": {}, @@ -4303,7 +4306,7 @@ "type": "bonfire", "title": "Problem 126: Cuboid layers", "tests": [ - "assert.strictEqual(euler126(), 18522, 'message: \u003ccode\u003eeuler126()\u003c/code\u003e should return 18522.');" + "assert.strictEqual(euler126(), 18522, 'message: euler126() should return 18522.');" ], "solutions": [], "translations": {}, @@ -4332,7 +4335,7 @@ "type": "bonfire", "title": "Problem 127: abc-hits", "tests": [ - "assert.strictEqual(euler127(), 18407904, 'message: \u003ccode\u003eeuler127()\u003c/code\u003e should return 18407904.');" + "assert.strictEqual(euler127(), 18407904, 'message: euler127() should return 18407904.');" ], "solutions": [], "translations": {}, @@ -4348,16 +4351,16 @@ "The radical of n, rad(n), is the product of distinct prime factors of n. For example, 504 = 23 × 32 × 7, so rad(504) = 2 × 3 × 7 = 42.", "We shall define the triplet of positive integers (a, b, c) to be an abc-hit if:", "GCD(a, b) = GCD(a, c) = GCD(b, c) = 1", - "a \u003c b", + "a < b", "a + b = c", - "rad(abc) \u003c c", + "rad(abc) < c", "For example, (5, 27, 32) is an abc-hit, because:", "GCD(5, 27) = GCD(5, 32) = GCD(27, 32) = 1", - "5 \u003c 27", + "5 < 27", "5 + 27 = 32", - "rad(4320) = 30 \u003c 32", - "It turns out that abc-hits are quite rare and there are only thirty-one abc-hits for c \u003c 1000, with ∑c = 12523.", - "Find ∑c for c \u003c 120000." + "rad(4320) = 30 < 32", + "It turns out that abc-hits are quite rare and there are only thirty-one abc-hits for c < 1000, with ∑c = 12523.", + "Find ∑c for c < 120000." ] }, { @@ -4366,7 +4369,7 @@ "type": "bonfire", "title": "Problem 128: Hexagonal tile differences", "tests": [ - "assert.strictEqual(euler128(), 14516824220, 'message: \u003ccode\u003eeuler128()\u003c/code\u003e should return 14516824220.');" + "assert.strictEqual(euler128(), 14516824220, 'message: euler128() should return 14516824220.');" ], "solutions": [], "translations": {}, @@ -4397,7 +4400,7 @@ "type": "bonfire", "title": "Problem 129: Repunit divisibility", "tests": [ - "assert.strictEqual(euler129(), 1000023, 'message: \u003ccode\u003eeuler129()\u003c/code\u003e should return 1000023.');" + "assert.strictEqual(euler129(), 1000023, 'message: euler129() should return 1000023.');" ], "solutions": [], "translations": {}, @@ -4422,7 +4425,7 @@ "type": "bonfire", "title": "Problem 130: Composites with prime repunit property", "tests": [ - "assert.strictEqual(euler130(), 149253, 'message: \u003ccode\u003eeuler130()\u003c/code\u003e should return 149253.');" + "assert.strictEqual(euler130(), 149253, 'message: euler130() should return 149253.');" ], "solutions": [], "translations": {}, @@ -4437,7 +4440,7 @@ "description": [ "A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k; for example, R(6) = 111111.", "Given that n is a positive integer and GCD(n, 10) = 1, it can be shown that there always exists a value, k, for which R(k) is divisible by n, and let A(n) be the least such value of k; for example, A(7) = 6 and A(41) = 5.", - "You are given that for all primes, p \u003e 5, that p − 1 is divisible by A(p). For example, when p = 41, A(41) = 5, and 40 is divisible by 5.", + "You are given that for all primes, p > 5, that p − 1 is divisible by A(p). For example, when p = 41, A(41) = 5, and 40 is divisible by 5.", "However, there are rare composite values for which this is also true; the first five examples being 91, 259, 451, 481, and 703.", "Find the sum of the first twenty-five composite values of n for whichGCD(n, 10) = 1 and n − 1 is divisible by A(n)." ] @@ -4448,7 +4451,7 @@ "type": "bonfire", "title": "Problem 131: Prime cube partnership", "tests": [ - "assert.strictEqual(euler131(), 173, 'message: \u003ccode\u003eeuler131()\u003c/code\u003e should return 173.');" + "assert.strictEqual(euler131(), 173, 'message: euler131() should return 173.');" ], "solutions": [], "translations": {}, @@ -4473,7 +4476,7 @@ "type": "bonfire", "title": "Problem 132: Large repunit factors", "tests": [ - "assert.strictEqual(euler132(), 843296, 'message: \u003ccode\u003eeuler132()\u003c/code\u003e should return 843296.');" + "assert.strictEqual(euler132(), 843296, 'message: euler132() should return 843296.');" ], "solutions": [], "translations": {}, @@ -4497,7 +4500,7 @@ "type": "bonfire", "title": "Problem 133: Repunit nonfactors", "tests": [ - "assert.strictEqual(euler133(), 453647705, 'message: \u003ccode\u003eeuler133()\u003c/code\u003e should return 453647705.');" + "assert.strictEqual(euler133(), 453647705, 'message: euler133() should return 453647705.');" ], "solutions": [], "translations": {}, @@ -4522,7 +4525,7 @@ "type": "bonfire", "title": "Problem 134: Prime pair connection", "tests": [ - "assert.strictEqual(euler134(), 18613426663617120, 'message: \u003ccode\u003eeuler134()\u003c/code\u003e should return 18613426663617120.');" + "assert.strictEqual(euler134(), 18613426663617120, 'message: euler134() should return 18613426663617120.');" ], "solutions": [], "translations": {}, @@ -4536,7 +4539,7 @@ ], "description": [ "Consider the consecutive primes p1 = 19 and p2 = 23. It can be verified that 1219 is the smallest number such that the last digits are formed by p1 whilst also being divisible by p2.", - "In fact, with the exception of p1 = 3 and p2 = 5, for every pair of consecutive primes, p2 \u003e p1, there exist values of n for which the last digits are formed by p1 and n is divisible by p2. Let S be the smallest of these values of n.", + "In fact, with the exception of p1 = 3 and p2 = 5, for every pair of consecutive primes, p2 > p1, there exist values of n for which the last digits are formed by p1 and n is divisible by p2. Let S be the smallest of these values of n.", "Find ∑ S for every pair of consecutive primes with 5 ≤ p1 ≤ 1000000." ] }, @@ -4546,7 +4549,7 @@ "type": "bonfire", "title": "Problem 135: Same differences", "tests": [ - "assert.strictEqual(euler135(), 4989, 'message: \u003ccode\u003eeuler135()\u003c/code\u003e should return 4989.');" + "assert.strictEqual(euler135(), 4989, 'message: euler135() should return 4989.');" ], "solutions": [], "translations": {}, @@ -4571,7 +4574,7 @@ "type": "bonfire", "title": "Problem 136: Singleton difference", "tests": [ - "assert.strictEqual(euler136(), 2544559, 'message: \u003ccode\u003eeuler136()\u003c/code\u003e should return 2544559.');" + "assert.strictEqual(euler136(), 2544559, 'message: euler136() should return 2544559.');" ], "solutions": [], "translations": {}, @@ -4596,7 +4599,7 @@ "type": "bonfire", "title": "Problem 137: Fibonacci golden nuggets", "tests": [ - "assert.strictEqual(euler137(), 1120149658760, 'message: \u003ccode\u003eeuler137()\u003c/code\u003e should return 1120149658760.');" + "assert.strictEqual(euler137(), 1120149658760, 'message: euler137() should return 1120149658760.');" ], "solutions": [], "translations": {}, @@ -4639,7 +4642,7 @@ "type": "bonfire", "title": "Problem 138: Special isosceles triangles", "tests": [ - "assert.strictEqual(euler138(), 1118049290473932, 'message: \u003ccode\u003eeuler138()\u003c/code\u003e should return 1118049290473932.');" + "assert.strictEqual(euler138(), 1118049290473932, 'message: euler138() should return 1118049290473932.');" ], "solutions": [], "translations": {}, @@ -4666,7 +4669,7 @@ "type": "bonfire", "title": "Problem 139: Pythagorean tiles", "tests": [ - "assert.strictEqual(euler139(), 10057761, 'message: \u003ccode\u003eeuler139()\u003c/code\u003e should return 10057761.');" + "assert.strictEqual(euler139(), 10057761, 'message: euler139() should return 10057761.');" ], "solutions": [], "translations": {}, @@ -4693,7 +4696,7 @@ "type": "bonfire", "title": "Problem 140: Modified Fibonacci golden nuggets", "tests": [ - "assert.strictEqual(euler140(), 5673835352990, 'message: \u003ccode\u003eeuler140()\u003c/code\u003e should return 5673835352990.');" + "assert.strictEqual(euler140(), 5673835352990, 'message: euler140() should return 5673835352990.');" ], "solutions": [], "translations": {}, @@ -4727,7 +4730,7 @@ "type": "bonfire", "title": "Problem 141: Investigating progressive numbers, n, which are also square", "tests": [ - "assert.strictEqual(euler141(), 878454337159, 'message: \u003ccode\u003eeuler141()\u003c/code\u003e should return 878454337159.');" + "assert.strictEqual(euler141(), 878454337159, 'message: euler141() should return 878454337159.');" ], "solutions": [], "translations": {}, @@ -4753,7 +4756,7 @@ "type": "bonfire", "title": "Problem 142: Perfect Square Collection", "tests": [ - "assert.strictEqual(euler142(), 1006193, 'message: \u003ccode\u003eeuler142()\u003c/code\u003e should return 1006193.');" + "assert.strictEqual(euler142(), 1006193, 'message: euler142() should return 1006193.');" ], "solutions": [], "translations": {}, @@ -4766,7 +4769,7 @@ "euler142();" ], "description": [ - "Find the smallest x + y + z with integers x \u003e y \u003e z \u003e 0 such that x + y, x − y, x + z, x − z, y + z, y − z are all perfect squares." + "Find the smallest x + y + z with integers x > y > z > 0 such that x + y, x − y, x + z, x − z, y + z, y − z are all perfect squares." ] }, { @@ -4775,7 +4778,7 @@ "type": "bonfire", "title": "Problem 143: Investigating the Torricelli point of a triangle", "tests": [ - "assert.strictEqual(euler143(), 30758397, 'message: \u003ccode\u003eeuler143()\u003c/code\u003e should return 30758397.');" + "assert.strictEqual(euler143(), 30758397, 'message: euler143() should return 30758397.');" ], "solutions": [], "translations": {}, @@ -4802,7 +4805,7 @@ "type": "bonfire", "title": "Problem 144: Investigating multiple reflections of a laser beam", "tests": [ - "assert.strictEqual(euler144(), 354, 'message: \u003ccode\u003eeuler144()\u003c/code\u003e should return 354.');" + "assert.strictEqual(euler144(), 354, 'message: euler144() should return 354.');" ], "solutions": [], "translations": {}, @@ -4833,7 +4836,7 @@ "type": "bonfire", "title": "Problem 145: How many reversible numbers are there below one-billion?", "tests": [ - "assert.strictEqual(euler145(), 608720, 'message: \u003ccode\u003eeuler145()\u003c/code\u003e should return 608720.');" + "assert.strictEqual(euler145(), 608720, 'message: euler145() should return 608720.');" ], "solutions": [], "translations": {}, @@ -4859,7 +4862,7 @@ "type": "bonfire", "title": "Problem 146: Investigating a Prime Pattern", "tests": [ - "assert.strictEqual(euler146(), 676333270, 'message: \u003ccode\u003eeuler146()\u003c/code\u003e should return 676333270.');" + "assert.strictEqual(euler146(), 676333270, 'message: euler146() should return 676333270.');" ], "solutions": [], "translations": {}, @@ -4883,7 +4886,7 @@ "type": "bonfire", "title": "Problem 147: Rectangles in cross-hatched grids", "tests": [ - "assert.strictEqual(euler147(), 846910284, 'message: \u003ccode\u003eeuler147()\u003c/code\u003e should return 846910284.');" + "assert.strictEqual(euler147(), 846910284, 'message: euler147() should return 846910284.');" ], "solutions": [], "translations": {}, @@ -4916,7 +4919,7 @@ "type": "bonfire", "title": "Problem 148: Exploring Pascal's triangle", "tests": [ - "assert.strictEqual(euler148(), 2129970655314432, 'message: \u003ccode\u003eeuler148()\u003c/code\u003e should return 2129970655314432.');" + "assert.strictEqual(euler148(), 2129970655314432, 'message: euler148() should return 2129970655314432.');" ], "solutions": [], "translations": {}, @@ -5011,7 +5014,7 @@ "type": "bonfire", "title": "Problem 149: Searching for a maximum-sum subsequence", "tests": [ - "assert.strictEqual(euler149(), 52852124, 'message: \u003ccode\u003eeuler149()\u003c/code\u003e should return 52852124.');" + "assert.strictEqual(euler149(), 52852124, 'message: euler149() should return 52852124.');" ], "solutions": [], "translations": {}, @@ -5049,7 +5052,7 @@ "type": "bonfire", "title": "Problem 150: Searching a triangular array for a sub-triangle having minimum-sum", "tests": [ - "assert.strictEqual(euler150(), -271248680, 'message: \u003ccode\u003eeuler150()\u003c/code\u003e should return -271248680.');" + "assert.strictEqual(euler150(), -271248680, 'message: euler150() should return -271248680.');" ], "solutions": [], "translations": {}, @@ -5096,7 +5099,7 @@ "type": "bonfire", "title": "Problem 151: Paper sheets of standard sizes: an expected-value problem", "tests": [ - "assert.strictEqual(euler151(), 0.464399, 'message: \u003ccode\u003eeuler151()\u003c/code\u003e should return 0.464399.');" + "assert.strictEqual(euler151(), 0.464399, 'message: euler151() should return 0.464399.');" ], "solutions": [], "translations": {}, @@ -5125,7 +5128,7 @@ "type": "bonfire", "title": "Problem 152: Writing 1/2 as a sum of inverse squares", "tests": [ - "assert.strictEqual(euler152(), 301, 'message: \u003ccode\u003eeuler152()\u003c/code\u003e should return 301.');" + "assert.strictEqual(euler152(), 301, 'message: euler152() should return 301.');" ], "solutions": [], "translations": {}, @@ -5151,7 +5154,7 @@ "type": "bonfire", "title": "Problem 153: Investigating Gaussian Integers", "tests": [ - "assert.strictEqual(euler153(), 17971254122360636, 'message: \u003ccode\u003eeuler153()\u003c/code\u003e should return 17971254122360636.');" + "assert.strictEqual(euler153(), 17971254122360636, 'message: euler153() should return 17971254122360636.');" ], "solutions": [], "translations": {}, @@ -5217,7 +5220,7 @@ "type": "bonfire", "title": "Problem 154: Exploring Pascal's pyramid", "tests": [ - "assert.strictEqual(euler154(), 479742450, 'message: \u003ccode\u003eeuler154()\u003c/code\u003e should return 479742450.');" + "assert.strictEqual(euler154(), 479742450, 'message: euler154() should return 479742450.');" ], "solutions": [], "translations": {}, @@ -5246,7 +5249,7 @@ "type": "bonfire", "title": "Problem 155: Counting Capacitor Circuits", "tests": [ - "assert.strictEqual(euler155(), 3857447, 'message: \u003ccode\u003eeuler155()\u003c/code\u003e should return 3857447.');" + "assert.strictEqual(euler155(), 3857447, 'message: euler155() should return 3857447.');" ], "solutions": [], "translations": {}, @@ -5277,7 +5280,7 @@ "type": "bonfire", "title": "Problem 156: Counting Digits", "tests": [ - "assert.strictEqual(euler156(), 21295121502550, 'message: \u003ccode\u003eeuler156()\u003c/code\u003e should return 21295121502550.');" + "assert.strictEqual(euler156(), 21295121502550, 'message: euler156() should return 21295121502550.');" ], "solutions": [], "translations": {}, @@ -5331,7 +5334,7 @@ "type": "bonfire", "title": "Problem 157: Solving the diophantine equation 1/a+1/b= p/10n", "tests": [ - "assert.strictEqual(euler157(), 53490, 'message: \u003ccode\u003eeuler157()\u003c/code\u003e should return 53490.');" + "assert.strictEqual(euler157(), 53490, 'message: euler157() should return 53490.');" ], "solutions": [], "translations": {}, @@ -5375,7 +5378,7 @@ "type": "bonfire", "title": "Problem 158: Exploring strings for which only one character comes lexicographically after its neighbour to the left", "tests": [ - "assert.strictEqual(euler158(), 409511334375, 'message: \u003ccode\u003eeuler158()\u003c/code\u003e should return 409511334375.');" + "assert.strictEqual(euler158(), 409511334375, 'message: euler158() should return 409511334375.');" ], "solutions": [], "translations": {}, @@ -5404,7 +5407,7 @@ "type": "bonfire", "title": "Problem 159: Digital root sums of factorisations", "tests": [ - "assert.strictEqual(euler159(), 14489159, 'message: \u003ccode\u003eeuler159()\u003c/code\u003e should return 14489159.');" + "assert.strictEqual(euler159(), 14489159, 'message: euler159() should return 14489159.');" ], "solutions": [], "translations": {}, @@ -5442,7 +5445,7 @@ "524", "6The maximum Digital Root Sum of 24 is 11.", "The function mdrs(n) gives the maximum Digital Root Sum of n. So mdrs(24)=11.", - "Find ∑mdrs(n) for 1 \u003c n \u003c 1,000,000." + "Find ∑mdrs(n) for 1 < n < 1,000,000." ] }, { @@ -5451,7 +5454,7 @@ "type": "bonfire", "title": "Problem 160: Factorial trailing digits", "tests": [ - "assert.strictEqual(euler160(), 16576, 'message: \u003ccode\u003eeuler160()\u003c/code\u003e should return 16576.');" + "assert.strictEqual(euler160(), 16576, 'message: euler160() should return 16576.');" ], "solutions": [], "translations": {}, @@ -5478,7 +5481,7 @@ "type": "bonfire", "title": "Problem 161: Triominoes", "tests": [ - "assert.strictEqual(euler161(), 20574308184277972, 'message: \u003ccode\u003eeuler161()\u003c/code\u003e should return 20574308184277972.');" + "assert.strictEqual(euler161(), 20574308184277972, 'message: euler161() should return 20574308184277972.');" ], "solutions": [], "translations": {}, @@ -5514,7 +5517,7 @@ "type": "bonfire", "title": "Problem 162: Hexadecimal numbers", "tests": [ - "assert.strictEqual(euler162(), 3D58725572C62302, 'message: \u003ccode\u003eeuler162()\u003c/code\u003e should return 3D58725572C62302.');" + "assert.strictEqual(euler162(), 3D58725572C62302, 'message: euler162() should return 3D58725572C62302.');" ], "solutions": [], "translations": {}, @@ -5543,7 +5546,7 @@ "type": "bonfire", "title": "Problem 163: Cross-hatched triangles", "tests": [ - "assert.strictEqual(euler163(), 343047, 'message: \u003ccode\u003eeuler163()\u003c/code\u003e should return 343047.');" + "assert.strictEqual(euler163(), 343047, 'message: euler163() should return 343047.');" ], "solutions": [], "translations": {}, @@ -5572,7 +5575,7 @@ "type": "bonfire", "title": "Problem 164: Numbers for which no three consecutive digits have a sum greater than a given value", "tests": [ - "assert.strictEqual(euler164(), 378158756814587, 'message: \u003ccode\u003eeuler164()\u003c/code\u003e should return 378158756814587.');" + "assert.strictEqual(euler164(), 378158756814587, 'message: euler164() should return 378158756814587.');" ], "solutions": [], "translations": {}, @@ -5594,7 +5597,7 @@ "type": "bonfire", "title": "Problem 165: Intersections", "tests": [ - "assert.strictEqual(euler165(), 2868868, 'message: \u003ccode\u003eeuler165()\u003c/code\u003e should return 2868868.');" + "assert.strictEqual(euler165(), 2868868, 'message: euler165() should return 2868868.');" ], "solutions": [], "translations": {}, @@ -5633,7 +5636,7 @@ "type": "bonfire", "title": "Problem 166: Criss Cross", "tests": [ - "assert.strictEqual(euler166(), 7130034, 'message: \u003ccode\u003eeuler166()\u003c/code\u003e should return 7130034.');" + "assert.strictEqual(euler166(), 7130034, 'message: euler166() should return 7130034.');" ], "solutions": [], "translations": {}, @@ -5667,7 +5670,7 @@ "type": "bonfire", "title": "Problem 167: Investigating Ulam sequences", "tests": [ - "assert.strictEqual(euler167(), 3916160068885, 'message: \u003ccode\u003eeuler167()\u003c/code\u003e should return 3916160068885.');" + "assert.strictEqual(euler167(), 3916160068885, 'message: euler167() should return 3916160068885.');" ], "solutions": [], "translations": {}, @@ -5680,7 +5683,7 @@ "euler167();" ], "description": [ - "For two positive integers a and b, the Ulam sequence U(a,b) is defined by U(a,b)1 = a, U(a,b)2 = b and for k \u003e 2,", + "For two positive integers a and b, the Ulam sequence U(a,b) is defined by U(a,b)1 = a, U(a,b)2 = b and for k > 2,", "U(a,b)k is the smallest integer greater than U(a,b)(k-1) which can be written in exactly one way as the sum of two distinct previous members of U(a,b).", "For example, the sequence U(1,2) begins with", "1, 2, 3 = 1 + 2, 4 = 1 + 3, 6 = 2 + 4, 8 = 2 + 6, 11 = 3 + 8;", @@ -5694,7 +5697,7 @@ "type": "bonfire", "title": "Problem 168: Number Rotations", "tests": [ - "assert.strictEqual(euler168(), 59206, 'message: \u003ccode\u003eeuler168()\u003c/code\u003e should return 59206.');" + "assert.strictEqual(euler168(), 59206, 'message: euler168() should return 59206.');" ], "solutions": [], "translations": {}, @@ -5710,7 +5713,7 @@ "Consider the number 142857. We can right-rotate this number by moving the last digit (7) to the front of it, giving us 714285.", "It can be verified that 714285=5×142857.", "This demonstrates an unusual property of 142857: it is a divisor of its right-rotation.", - "Find the last 5 digits of the sum of all integers n, 10 \u003c n \u003c 10100, that have this property." + "Find the last 5 digits of the sum of all integers n, 10 < n < 10100, that have this property." ] }, { @@ -5719,7 +5722,7 @@ "type": "bonfire", "title": "Problem 169: Exploring the number of different ways a number can be expressed as a sum of powers of 2", "tests": [ - "assert.strictEqual(euler169(), 178653872807, 'message: \u003ccode\u003eeuler169()\u003c/code\u003e should return 178653872807.');" + "assert.strictEqual(euler169(), 178653872807, 'message: euler169() should return 178653872807.');" ], "solutions": [], "translations": {}, @@ -5747,7 +5750,7 @@ "type": "bonfire", "title": "Problem 170: Find the largest 0 to 9 pandigital that can be formed by concatenating products", "tests": [ - "assert.strictEqual(euler170(), 9857164023, 'message: \u003ccode\u003eeuler170()\u003c/code\u003e should return 9857164023.');" + "assert.strictEqual(euler170(), 9857164023, 'message: euler170() should return 9857164023.');" ], "solutions": [], "translations": {}, @@ -5778,7 +5781,7 @@ "type": "bonfire", "title": "Problem 171: Finding numbers for which the sum of the squares of the digits is a square", "tests": [ - "assert.strictEqual(euler171(), 142989277, 'message: \u003ccode\u003eeuler171()\u003c/code\u003e should return 142989277.');" + "assert.strictEqual(euler171(), 142989277, 'message: euler171() should return 142989277.');" ], "solutions": [], "translations": {}, @@ -5795,7 +5798,7 @@ "f(3) = 32 = 9,", "f(25) = 22 + 52 = 4 + 25 = 29,", "f(442) = 42 + 42 + 22 = 16 + 16 + 4 = 36", - "Find the last nine digits of the sum of all n, 0 \u003c n \u003c 1020, such that f(n) is a perfect square." + "Find the last nine digits of the sum of all n, 0 < n < 1020, such that f(n) is a perfect square." ] }, { @@ -5804,7 +5807,7 @@ "type": "bonfire", "title": "Problem 172: Investigating numbers with few repeated digits", "tests": [ - "assert.strictEqual(euler172(), 227485267000992000, 'message: \u003ccode\u003eeuler172()\u003c/code\u003e should return 227485267000992000.');" + "assert.strictEqual(euler172(), 227485267000992000, 'message: euler172() should return 227485267000992000.');" ], "solutions": [], "translations": {}, @@ -5826,7 +5829,7 @@ "type": "bonfire", "title": "Problem 173: Using up to one million tiles how many different \"hollow\" square laminae can be formed?", "tests": [ - "assert.strictEqual(euler173(), 1572729, 'message: \u003ccode\u003eeuler173()\u003c/code\u003e should return 1572729.');" + "assert.strictEqual(euler173(), 1572729, 'message: euler173() should return 1572729.');" ], "solutions": [], "translations": {}, @@ -5852,7 +5855,7 @@ "type": "bonfire", "title": "Problem 174: Counting the number of \"hollow\" square laminae that can form one, two, three, ... distinct arrangements", "tests": [ - "assert.strictEqual(euler174(), 209566, 'message: \u003ccode\u003eeuler174()\u003c/code\u003e should return 209566.');" + "assert.strictEqual(euler174(), 209566, 'message: euler174() should return 209566.');" ], "solutions": [], "translations": {}, @@ -5880,7 +5883,7 @@ "type": "bonfire", "title": "Problem 175: Fractions involving the number of different ways a number can be expressed as a sum of powers of 2", "tests": [ - "assert.strictEqual(euler175(), 1, 13717420, 8, 'message: \u003ccode\u003eeuler175()\u003c/code\u003e should return 1, 13717420, 8.');" + "assert.strictEqual(euler175(), 1, 13717420, 8, 'message: euler175() should return 1, 13717420, 8.');" ], "solutions": [], "translations": {}, @@ -5897,7 +5900,7 @@ "", "For example, f(10)=5 since there are five different ways to express 10:10 = 8+2 = 8+1+1 = 4+4+2 = 4+2+2+1+1 = 4+4+1+1", "", - "It can be shown that for every fraction p/q (p\u003e0, q\u003e0) there exists at least one integer n such that f(n)/f(n-1)=p/q.", + "It can be shown that for every fraction p/q (p>0, q>0) there exists at least one integer n such that f(n)/f(n-1)=p/q.", "For instance, the smallest n for which f(n)/f(n-1)=13/17 is 241.", "The binary expansion of 241 is 11110001.", "Reading this binary number from the most significant bit to the least significant bit there are 4 one's, 3 zeroes and 1 one. We shall call the string 4,3,1 the Shortened Binary Expansion of 241.", @@ -5911,7 +5914,7 @@ "type": "bonfire", "title": "Problem 176: Right-angled triangles that share a cathetus", "tests": [ - "assert.strictEqual(euler176(), 96818198400000, 'message: \u003ccode\u003eeuler176()\u003c/code\u003e should return 96818198400000.');" + "assert.strictEqual(euler176(), 96818198400000, 'message: euler176() should return 96818198400000.');" ], "solutions": [], "translations": {}, @@ -5934,7 +5937,7 @@ "type": "bonfire", "title": "Problem 177: Integer angled Quadrilaterals", "tests": [ - "assert.strictEqual(euler177(), 129325, 'message: \u003ccode\u003eeuler177()\u003c/code\u003e should return 129325.');" + "assert.strictEqual(euler177(), 129325, 'message: euler177() should return 129325.');" ], "solutions": [], "translations": {}, @@ -5961,7 +5964,7 @@ "type": "bonfire", "title": "Problem 178: Step Numbers", "tests": [ - "assert.strictEqual(euler178(), 126461847755, 'message: \u003ccode\u003eeuler178()\u003c/code\u003e should return 126461847755.');" + "assert.strictEqual(euler178(), 126461847755, 'message: euler178() should return 126461847755.');" ], "solutions": [], "translations": {}, @@ -5988,7 +5991,7 @@ "type": "bonfire", "title": "Problem 179: Consecutive positive divisors", "tests": [ - "assert.strictEqual(euler179(), 986262, 'message: \u003ccode\u003eeuler179()\u003c/code\u003e should return 986262.');" + "assert.strictEqual(euler179(), 986262, 'message: euler179() should return 986262.');" ], "solutions": [], "translations": {}, @@ -6001,7 +6004,7 @@ "euler179();" ], "description": [ - "Find the number of integers 1 \u003c n \u003c 107, for which n and n + 1 have the same number of positive divisors. For example, 14 has the positive divisors 1, 2, 7, 14 while 15 has 1, 3, 5, 15." + "Find the number of integers 1 < n < 107, for which n and n + 1 have the same number of positive divisors. For example, 14 has the positive divisors 1, 2, 7, 14 while 15 has 1, 3, 5, 15." ] }, { @@ -6010,7 +6013,7 @@ "type": "bonfire", "title": "Problem 180: Rational zeros of a function of three variables", "tests": [ - "assert.strictEqual(euler180(), 285196020571078980, 'message: \u003ccode\u003eeuler180()\u003c/code\u003e should return 285196020571078980.');" + "assert.strictEqual(euler180(), 285196020571078980, 'message: euler180() should return 285196020571078980.');" ], "solutions": [], "translations": {}, @@ -6028,7 +6031,7 @@ "and their combination", "fn(x,y,z) = f1,n(x,y,z) + f2,n(x,y,z) − f3,n(x,y,z)", "We call (x,y,z) a golden triple of order k if x, y, and z are all rational numbers of the form a / b with", - "0 \u003c a \u003c b ≤ k and there is (at least) one integer n, so that fn(x,y,z) = 0.", + "0 < a < b ≤ k and there is (at least) one integer n, so that fn(x,y,z) = 0.", "Let s(x,y,z) = x + y + z.", "Let t = u / v be the sum of all distinct s(x,y,z) for all golden triples (x,y,z) of order 35. All the s(x,y,z) and t must be in reduced form.", "Find u + v." @@ -6040,7 +6043,7 @@ "type": "bonfire", "title": "Problem 181: Investigating in how many ways objects of two different colours can be grouped", "tests": [ - "assert.strictEqual(euler181(), 83735848679360670, 'message: \u003ccode\u003eeuler181()\u003c/code\u003e should return 83735848679360670.');" + "assert.strictEqual(euler181(), 83735848679360670, 'message: euler181() should return 83735848679360670.');" ], "solutions": [], "translations": {}, @@ -6065,7 +6068,7 @@ "type": "bonfire", "title": "Problem 182: RSA encryption", "tests": [ - "assert.strictEqual(euler182(), 399788195976, 'message: \u003ccode\u003eeuler182()\u003c/code\u003e should return 399788195976.');" + "assert.strictEqual(euler182(), 399788195976, 'message: euler182() should return 399788195976.');" ], "solutions": [], "translations": {}, @@ -6080,7 +6083,7 @@ "description": [ "The RSA encryption is based on the following procedure:", "Generate two distinct primes p and q.Compute n=pq and φ=(p-1)(q-1).", - "Find an integer e, 1\u003ce\u003cφ, such that gcd(e,φ)=1.", + "Find an integer e, 1euler183() should return 48861552.');" ], "solutions": [], "translations": {}, @@ -6138,7 +6141,7 @@ "type": "bonfire", "title": "Problem 184: Triangles containing the origin", "tests": [ - "assert.strictEqual(euler184(), 1725323624056, 'message: \u003ccode\u003eeuler184()\u003c/code\u003e should return 1725323624056.');" + "assert.strictEqual(euler184(), 1725323624056, 'message: euler184() should return 1725323624056.');" ], "solutions": [], "translations": {}, @@ -6151,7 +6154,7 @@ "euler184();" ], "description": [ - "Consider the set Ir of points (x,y) with integer co-ordinates in the interior of the circle with radius r, centered at the origin, i.e. x2 + y2 \u003c r2.", + "Consider the set Ir of points (x,y) with integer co-ordinates in the interior of the circle with radius r, centered at the origin, i.e. x2 + y2 < r2.", "For a radius of 2, I2 contains the nine points (0,0), (1,0), (1,1), (0,1), (-1,1), (-1,0), (-1,-1), (0,-1) and (1,-1). There are eight triangles having all three vertices in I2 which contain the origin in the interior. Two of them are shown below, the others are obtained from these by rotation.", "", "", @@ -6166,7 +6169,7 @@ "type": "bonfire", "title": "Problem 185: Number Mind", "tests": [ - "assert.strictEqual(euler185(), 4640261571849533, 'message: \u003ccode\u003eeuler185()\u003c/code\u003e should return 4640261571849533.');" + "assert.strictEqual(euler185(), 4640261571849533, 'message: euler185() should return 4640261571849533.');" ], "solutions": [], "translations": {}, @@ -6225,7 +6228,7 @@ "type": "bonfire", "title": "Problem 186: Connectedness of a network", "tests": [ - "assert.strictEqual(euler186(), 2325629, 'message: \u003ccode\u003eeuler186()\u003c/code\u003e should return 2325629.');" + "assert.strictEqual(euler186(), 2325629, 'message: euler186() should return 2325629.');" ], "solutions": [], "translations": {}, @@ -6259,7 +6262,7 @@ "type": "bonfire", "title": "Problem 187: Semiprimes", "tests": [ - "assert.strictEqual(euler187(), 17427258, 'message: \u003ccode\u003eeuler187()\u003c/code\u003e should return 17427258.');" + "assert.strictEqual(euler187(), 17427258, 'message: euler187() should return 17427258.');" ], "solutions": [], "translations": {}, @@ -6277,7 +6280,7 @@ "There are ten composites below thirty containing precisely two, not necessarily distinct, prime factors:", "4, 6, 9, 10, 14, 15, 21, 22, 25, 26.", "", - "How many composite integers, n \u003c 108, have precisely two, not necessarily distinct, prime factors?" + "How many composite integers, n < 108, have precisely two, not necessarily distinct, prime factors?" ] }, { @@ -6286,7 +6289,7 @@ "type": "bonfire", "title": "Problem 188: The hyperexponentiation of a number", "tests": [ - "assert.strictEqual(euler188(), 95962097, 'message: \u003ccode\u003eeuler188()\u003c/code\u003e should return 95962097.');" + "assert.strictEqual(euler188(), 95962097, 'message: euler188() should return 95962097.');" ], "solutions": [], "translations": {}, @@ -6313,7 +6316,7 @@ "type": "bonfire", "title": "Problem 189: Tri-colouring a triangular grid", "tests": [ - "assert.strictEqual(euler189(), 10834893628237824, 'message: \u003ccode\u003eeuler189()\u003c/code\u003e should return 10834893628237824.');" + "assert.strictEqual(euler189(), 10834893628237824, 'message: euler189() should return 10834893628237824.');" ], "solutions": [], "translations": {}, @@ -6347,7 +6350,7 @@ "type": "bonfire", "title": "Problem 190: Maximising a weighted product", "tests": [ - "assert.strictEqual(euler190(), 371048281, 'message: \u003ccode\u003eeuler190()\u003c/code\u003e should return 371048281.');" + "assert.strictEqual(euler190(), 371048281, 'message: euler190() should return 371048281.');" ], "solutions": [], "translations": {}, @@ -6373,7 +6376,7 @@ "type": "bonfire", "title": "Problem 191: Prize Strings", "tests": [ - "assert.strictEqual(euler191(), 1918080160, 'message: \u003ccode\u003eeuler191()\u003c/code\u003e should return 1918080160.');" + "assert.strictEqual(euler191(), 1918080160, 'message: euler191() should return 1918080160.');" ], "solutions": [], "translations": {}, @@ -6407,7 +6410,7 @@ "type": "bonfire", "title": "Problem 192: Best Approximations", "tests": [ - "assert.strictEqual(euler192(), 57060635927998344, 'message: \u003ccode\u003eeuler192()\u003c/code\u003e should return 57060635927998344.');" + "assert.strictEqual(euler192(), 57060635927998344, 'message: euler192() should return 57060635927998344.');" ], "solutions": [], "translations": {}, @@ -6423,11 +6426,11 @@ "Let x be a real number.", "A best approximation to x for the denominator bound d is a rational number r/s in reduced form, with s ≤ d, such that any rational number which is closer to x than r/s has a denominator larger than d:", "", - "|p/q-x| \u003c |r/s-x| ⇒ q \u003e d", + "|p/q-x| < |r/s-x| ⇒ q > d", "", "For example, the best approximation to √13 for the denominator bound 20 is 18/5 and the best approximation to √13 for the denominator bound 30 is 101/28.", "", - "Find the sum of all denominators of the best approximations to √n for the denominator bound 1012, where n is not a perfect square and 1 \u003c n ≤ 100000." + "Find the sum of all denominators of the best approximations to √n for the denominator bound 1012, where n is not a perfect square and 1 < n ≤ 100000." ] }, { @@ -6436,7 +6439,7 @@ "type": "bonfire", "title": "Problem 193: Squarefree Numbers", "tests": [ - "assert.strictEqual(euler193(), 684465067343069, 'message: \u003ccode\u003eeuler193()\u003c/code\u003e should return 684465067343069.');" + "assert.strictEqual(euler193(), 684465067343069, 'message: euler193() should return 684465067343069.');" ], "solutions": [], "translations": {}, @@ -6460,7 +6463,7 @@ "type": "bonfire", "title": "Problem 194: Coloured Configurations", "tests": [ - "assert.strictEqual(euler194(), 61190912, 'message: \u003ccode\u003eeuler194()\u003c/code\u003e should return 61190912.');" + "assert.strictEqual(euler194(), 61190912, 'message: euler194() should return 61190912.');" ], "solutions": [], "translations": {}, @@ -6492,7 +6495,7 @@ "type": "bonfire", "title": "Problem 195: Inscribed circles of triangles with one angle of 60 degrees", "tests": [ - "assert.strictEqual(euler195(), 75085391, 'message: \u003ccode\u003eeuler195()\u003c/code\u003e should return 75085391.');" + "assert.strictEqual(euler195(), 75085391, 'message: euler195() should return 75085391.');" ], "solutions": [], "translations": {}, @@ -6520,7 +6523,7 @@ "type": "bonfire", "title": "Problem 196: Prime triplets", "tests": [ - "assert.strictEqual(euler196(), 322303240771079940, 'message: \u003ccode\u003eeuler196()\u003c/code\u003e should return 322303240771079940.');" + "assert.strictEqual(euler196(), 322303240771079940, 'message: euler196() should return 322303240771079940.');" ], "solutions": [], "translations": {}, @@ -6568,7 +6571,7 @@ "type": "bonfire", "title": "Problem 197: Investigating the behaviour of a recursively defined sequence", "tests": [ - "assert.strictEqual(euler197(), 1.710637717, 'message: \u003ccode\u003eeuler197()\u003c/code\u003e should return 1.710637717.');" + "assert.strictEqual(euler197(), 1.710637717, 'message: euler197() should return 1.710637717.');" ], "solutions": [], "translations": {}, @@ -6594,7 +6597,7 @@ "type": "bonfire", "title": "Problem 198: Ambiguous Numbers", "tests": [ - "assert.strictEqual(euler198(), 52374425, 'message: \u003ccode\u003eeuler198()\u003c/code\u003e should return 52374425.');" + "assert.strictEqual(euler198(), 52374425, 'message: euler198() should return 52374425.');" ], "solutions": [], "translations": {}, @@ -6607,13 +6610,13 @@ "euler198();" ], "description": [ - "A best approximation to a real number x for the denominator bound d is a rational number r/s (in reduced form) with s ≤ d, so that any rational number p/q which is closer to x than r/s has q \u003e d.", + "A best approximation to a real number x for the denominator bound d is a rational number r/s (in reduced form) with s ≤ d, so that any rational number p/q which is closer to x than r/s has q > d.", "", "Usually the best approximation to a real number is uniquely determined for all denominator bounds. However, there are some exceptions, e.g. 9/40 has the two best approximations 1/4 and 1/5 for the denominator bound 6.", "We shall call a real number x ambiguous, if there is at least one denominator bound for which x possesses two best approximations. Clearly, an ambiguous number is necessarily rational.", "", "How many ambiguous numbers x = p/q,", - "0 \u003c x \u003c 1/100, are there whose denominator q does not exceed 108?" + "0 < x < 1/100, are there whose denominator q does not exceed 108?" ] }, { @@ -6622,7 +6625,7 @@ "type": "bonfire", "title": "Problem 199: Iterative Circle Packing", "tests": [ - "assert.strictEqual(euler199(), 0.00396087, 'message: \u003ccode\u003eeuler199()\u003c/code\u003e should return 0.00396087.');" + "assert.strictEqual(euler199(), 0.00396087, 'message: euler199() should return 0.00396087.');" ], "solutions": [], "translations": {}, @@ -6652,7 +6655,7 @@ "type": "bonfire", "title": "Problem 200: Find the 200th prime-proof sqube containing the contiguous sub-string \"200\"", "tests": [ - "assert.strictEqual(euler200(), 229161792008, 'message: \u003ccode\u003eeuler200()\u003c/code\u003e should return 229161792008.');" + "assert.strictEqual(euler200(), 229161792008, 'message: euler200() should return 229161792008.');" ], "solutions": [], "translations": {}, @@ -6681,7 +6684,7 @@ "type": "bonfire", "title": "Problem 201: Subsets with a unique sum", "tests": [ - "assert.strictEqual(euler201(), 115039000, 'message: \u003ccode\u003eeuler201()\u003c/code\u003e should return 115039000.');" + "assert.strictEqual(euler201(), 115039000, 'message: euler201() should return 115039000.');" ], "solutions": [], "translations": {}, @@ -6734,7 +6737,7 @@ "type": "bonfire", "title": "Problem 202: Laserbeam", "tests": [ - "assert.strictEqual(euler202(), 1209002624, 'message: \u003ccode\u003eeuler202()\u003c/code\u003e should return 1209002624.');" + "assert.strictEqual(euler202(), 1209002624, 'message: euler202() should return 1209002624.');" ], "solutions": [], "translations": {}, @@ -6765,7 +6768,7 @@ "type": "bonfire", "title": "Problem 203: Squarefree Binomial Coefficients", "tests": [ - "assert.strictEqual(euler203(), 34029210557338, 'message: \u003ccode\u003eeuler203()\u003c/code\u003e should return 34029210557338.');" + "assert.strictEqual(euler203(), 34029210557338, 'message: euler203() should return 34029210557338.');" ], "solutions": [], "translations": {}, @@ -6800,7 +6803,7 @@ "type": "bonfire", "title": "Problem 204: Generalised Hamming Numbers", "tests": [ - "assert.strictEqual(euler204(), 2944730, 'message: \u003ccode\u003eeuler204()\u003c/code\u003e should return 2944730.');" + "assert.strictEqual(euler204(), 2944730, 'message: euler204() should return 2944730.');" ], "solutions": [], "translations": {}, @@ -6829,7 +6832,7 @@ "type": "bonfire", "title": "Problem 205: Dice Game", "tests": [ - "assert.strictEqual(euler205(), 0.5731441, 'message: \u003ccode\u003eeuler205()\u003c/code\u003e should return 0.5731441.');" + "assert.strictEqual(euler205(), 0.5731441, 'message: euler205() should return 0.5731441.');" ], "solutions": [], "translations": {}, @@ -6856,7 +6859,7 @@ "type": "bonfire", "title": "Problem 206: Concealed Square", "tests": [ - "assert.strictEqual(euler206(), 1389019170, 'message: \u003ccode\u003eeuler206()\u003c/code\u003e should return 1389019170.');" + "assert.strictEqual(euler206(), 1389019170, 'message: euler206() should return 1389019170.');" ], "solutions": [], "translations": {}, @@ -6878,7 +6881,7 @@ "type": "bonfire", "title": "Problem 207: Integer partition equations", "tests": [ - "assert.strictEqual(euler207(), 44043947822, 'message: \u003ccode\u003eeuler207()\u003c/code\u003e should return 44043947822.');" + "assert.strictEqual(euler207(), 44043947822, 'message: euler207() should return 44043947822.');" ], "solutions": [], "translations": {}, @@ -6912,7 +6915,7 @@ "   P(185) = 3/13", "", "", - "Find the smallest m for which P(m) \u003c 1/12345" + "Find the smallest m for which P(m) < 1/12345" ] }, { @@ -6921,7 +6924,7 @@ "type": "bonfire", "title": "Problem 208: Robot Walks", "tests": [ - "assert.strictEqual(euler208(), 331951449665644800, 'message: \u003ccode\u003eeuler208()\u003c/code\u003e should return 331951449665644800.');" + "assert.strictEqual(euler208(), 331951449665644800, 'message: euler208() should return 331951449665644800.');" ], "solutions": [], "translations": {}, @@ -6950,7 +6953,7 @@ "type": "bonfire", "title": "Problem 209: Circular Logic", "tests": [ - "assert.strictEqual(euler209(), 15964587728784, 'message: \u003ccode\u003eeuler209()\u003c/code\u003e should return 15964587728784.');" + "assert.strictEqual(euler209(), 15964587728784, 'message: euler209() should return 15964587728784.');" ], "solutions": [], "translations": {}, @@ -6982,7 +6985,7 @@ "type": "bonfire", "title": "Problem 210: Obtuse Angled Triangles", "tests": [ - "assert.strictEqual(euler210(), 1598174770174689500, 'message: \u003ccode\u003eeuler210()\u003c/code\u003e should return 1598174770174689500.');" + "assert.strictEqual(euler210(), 1598174770174689500, 'message: euler210() should return 1598174770174689500.');" ], "solutions": [], "translations": {}, @@ -6997,7 +7000,7 @@ "description": [ "Consider the set S(r) of points (x,y) with integer coordinates satisfying |x| + |y| ≤ r. ", "Let O be the point (0,0) and C the point (r/4,r/4). ", - "Let N(r) be the number of points B in S(r), so that the triangle OBC has an obtuse angle, i.e. the largest angle α satisfies 90°\u003cα\u003c180°.", + "Let N(r) be the number of points B in S(r), so that the triangle OBC has an obtuse angle, i.e. the largest angle α satisfies 90°<α<180°.", "So, for example, N(4)=24 and N(8)=100.", "", "What is N(1,000,000,000)?" @@ -7009,7 +7012,7 @@ "type": "bonfire", "title": "Problem 211: Divisor Square Sum", "tests": [ - "assert.strictEqual(euler211(), 1922364685, 'message: \u003ccode\u003eeuler211()\u003c/code\u003e should return 1922364685.');" + "assert.strictEqual(euler211(), 1922364685, 'message: euler211() should return 1922364685.');" ], "solutions": [], "translations": {}, @@ -7024,7 +7027,7 @@ "description": [ "For a positive integer n, let σ2(n) be the sum of the squares of its divisors. For example,", "σ2(10) = 1 + 4 + 25 + 100 = 130.", - "Find the sum of all n, 0 \u003c n \u003c 64,000,000 such that σ2(n) is a perfect square." + "Find the sum of all n, 0 < n < 64,000,000 such that σ2(n) is a perfect square." ] }, { @@ -7033,7 +7036,7 @@ "type": "bonfire", "title": "Problem 212: Combined Volume of Cuboids", "tests": [ - "assert.strictEqual(euler212(), 328968937309, 'message: \u003ccode\u003eeuler212()\u003c/code\u003e should return 328968937309.');" + "assert.strictEqual(euler212(), 328968937309, 'message: euler212() should return 328968937309.');" ], "solutions": [], "translations": {}, @@ -7069,7 +7072,7 @@ "type": "bonfire", "title": "Problem 213: Flea Circus", "tests": [ - "assert.strictEqual(euler213(), 330.721154, 'message: \u003ccode\u003eeuler213()\u003c/code\u003e should return 330.721154.');" + "assert.strictEqual(euler213(), 330.721154, 'message: euler213() should return 330.721154.');" ], "solutions": [], "translations": {}, @@ -7094,7 +7097,7 @@ "type": "bonfire", "title": "Problem 214: Totient Chains", "tests": [ - "assert.strictEqual(euler214(), 1677366278943, 'message: \u003ccode\u003eeuler214()\u003c/code\u003e should return 1677366278943.');" + "assert.strictEqual(euler214(), 1677366278943, 'message: euler214() should return 1677366278943.');" ], "solutions": [], "translations": {}, @@ -7135,7 +7138,7 @@ "type": "bonfire", "title": "Problem 215: Crack-free Walls", "tests": [ - "assert.strictEqual(euler215(), 806844323190414, 'message: \u003ccode\u003eeuler215()\u003c/code\u003e should return 806844323190414.');" + "assert.strictEqual(euler215(), 806844323190414, 'message: euler215() should return 806844323190414.');" ], "solutions": [], "translations": {}, @@ -7166,7 +7169,7 @@ "type": "bonfire", "title": "Problem 216: Investigating the primality of numbers of the form 2n2-1", "tests": [ - "assert.strictEqual(euler216(), 5437849, 'message: \u003ccode\u003eeuler216()\u003c/code\u003e should return 5437849.');" + "assert.strictEqual(euler216(), 5437849, 'message: euler216() should return 5437849.');" ], "solutions": [], "translations": {}, @@ -7179,7 +7182,7 @@ "euler216();" ], "description": [ - "Consider numbers t(n) of the form t(n) = 2n2-1 with n \u003e 1.", + "Consider numbers t(n) of the form t(n) = 2n2-1 with n > 1.", "The first such numbers are 7, 17, 31, 49, 71, 97, 127 and 161.", "It turns out that only 49 = 7*7 and 161 = 7*23 are not prime.", "For n ≤ 10000 there are 2202 numbers t(n) that are prime.", @@ -7193,7 +7196,7 @@ "type": "bonfire", "title": "Problem 217: Balanced Numbers", "tests": [ - "assert.strictEqual(euler217(), 6273134, 'message: \u003ccode\u003eeuler217()\u003c/code\u003e should return 6273134.');" + "assert.strictEqual(euler217(), 6273134, 'message: euler217() should return 6273134.');" ], "solutions": [], "translations": {}, @@ -7219,7 +7222,7 @@ "type": "bonfire", "title": "Problem 218: Perfect right-angled triangles", "tests": [ - "assert.strictEqual(euler218(), 0, 'message: \u003ccode\u003eeuler218()\u003c/code\u003e should return 0.');" + "assert.strictEqual(euler218(), 0, 'message: euler218() should return 0.');" ], "solutions": [], "translations": {}, @@ -7255,7 +7258,7 @@ "type": "bonfire", "title": "Problem 219: Skew-cost coding", "tests": [ - "assert.strictEqual(euler219(), 64564225042, 'message: \u003ccode\u003eeuler219()\u003c/code\u003e should return 64564225042.');" + "assert.strictEqual(euler219(), 64564225042, 'message: euler219() should return 64564225042.');" ], "solutions": [], "translations": {}, @@ -7289,7 +7292,7 @@ "type": "bonfire", "title": "Problem 220: Heighway Dragon", "tests": [ - "assert.strictEqual(euler220(), 139776, 963904, 'message: \u003ccode\u003eeuler220()\u003c/code\u003e should return 139776, 963904.');" + "assert.strictEqual(euler220(), 139776, 963904, 'message: euler220() should return 139776, 963904.');" ], "solutions": [], "translations": {}, @@ -7326,7 +7329,7 @@ "type": "bonfire", "title": "Problem 221: Alexandrian Integers", "tests": [ - "assert.strictEqual(euler221(), 1884161251122450, 'message: \u003ccode\u003eeuler221()\u003c/code\u003e should return 1884161251122450.');" + "assert.strictEqual(euler221(), 1884161251122450, 'message: euler221() should return 1884161251122450.');" ], "solutions": [], "translations": {}, @@ -7367,7 +7370,7 @@ "type": "bonfire", "title": "Problem 222: Sphere Packing", "tests": [ - "assert.strictEqual(euler222(), 1590933, 'message: \u003ccode\u003eeuler222()\u003c/code\u003e should return 1590933.');" + "assert.strictEqual(euler222(), 1590933, 'message: euler222() should return 1590933.');" ], "solutions": [], "translations": {}, @@ -7391,7 +7394,7 @@ "type": "bonfire", "title": "Problem 223: Almost right-angled triangles I", "tests": [ - "assert.strictEqual(euler223(), 61614848, 'message: \u003ccode\u003eeuler223()\u003c/code\u003e should return 61614848.');" + "assert.strictEqual(euler223(), 61614848, 'message: euler223() should return 61614848.');" ], "solutions": [], "translations": {}, @@ -7415,7 +7418,7 @@ "type": "bonfire", "title": "Problem 224: Almost right-angled triangles II", "tests": [ - "assert.strictEqual(euler224(), 4137330, 'message: \u003ccode\u003eeuler224()\u003c/code\u003e should return 4137330.');" + "assert.strictEqual(euler224(), 4137330, 'message: euler224() should return 4137330.');" ], "solutions": [], "translations": {}, @@ -7439,7 +7442,7 @@ "type": "bonfire", "title": "Problem 225: Tribonacci non-divisors", "tests": [ - "assert.strictEqual(euler225(), 2009, 'message: \u003ccode\u003eeuler225()\u003c/code\u003e should return 2009.');" + "assert.strictEqual(euler225(), 2009, 'message: euler225() should return 2009.');" ], "solutions": [], "translations": {}, @@ -7467,7 +7470,7 @@ "type": "bonfire", "title": "Problem 226: A Scoop of Blancmange", "tests": [ - "assert.strictEqual(euler226(), 0.11316017, 'message: \u003ccode\u003eeuler226()\u003c/code\u003e should return 0.11316017.');" + "assert.strictEqual(euler226(), 0.11316017, 'message: euler226() should return 0.11316017.');" ], "solutions": [], "translations": {}, @@ -7498,7 +7501,7 @@ "type": "bonfire", "title": "Problem 227: The Chase", "tests": [ - "assert.strictEqual(euler227(), 3780.618622, 'message: \u003ccode\u003eeuler227()\u003c/code\u003e should return 3780.618622.');" + "assert.strictEqual(euler227(), 3780.618622, 'message: euler227() should return 3780.618622.');" ], "solutions": [], "translations": {}, @@ -7527,7 +7530,7 @@ "type": "bonfire", "title": "Problem 228: Minkowski Sums", "tests": [ - "assert.strictEqual(euler228(), 86226, 'message: \u003ccode\u003eeuler228()\u003c/code\u003e should return 86226.');" + "assert.strictEqual(euler228(), 86226, 'message: euler228() should return 86226.');" ], "solutions": [], "translations": {}, @@ -7571,7 +7574,7 @@ "type": "bonfire", "title": "Problem 229: Four Representations using Squares", "tests": [ - "assert.strictEqual(euler229(), 11325263, 'message: \u003ccode\u003eeuler229()\u003c/code\u003e should return 11325263.');" + "assert.strictEqual(euler229(), 11325263, 'message: euler229() should return 11325263.');" ], "solutions": [], "translations": {}, @@ -7611,7 +7614,7 @@ "type": "bonfire", "title": "Problem 230: Fibonacci Words", "tests": [ - "assert.strictEqual(euler230(), 850481152593119200, 'message: \u003ccode\u003eeuler230()\u003c/code\u003e should return 850481152593119200.');" + "assert.strictEqual(euler230(), 850481152593119200, 'message: euler230() should return 850481152593119200.');" ], "solutions": [], "translations": {}, @@ -7659,7 +7662,7 @@ "type": "bonfire", "title": "Problem 231: The prime factorisation of binomial coefficients", "tests": [ - "assert.strictEqual(euler231(), 7526965179680, 'message: \u003ccode\u003eeuler231()\u003c/code\u003e should return 7526965179680.');" + "assert.strictEqual(euler231(), 7526965179680, 'message: euler231() should return 7526965179680.');" ], "solutions": [], "translations": {}, @@ -7685,7 +7688,7 @@ "type": "bonfire", "title": "Problem 232: The Race", "tests": [ - "assert.strictEqual(euler232(), 0.83648556, 'message: \u003ccode\u003eeuler232()\u003c/code\u003e should return 0.83648556.');" + "assert.strictEqual(euler232(), 0.83648556, 'message: euler232() should return 0.83648556.');" ], "solutions": [], "translations": {}, @@ -7713,7 +7716,7 @@ "type": "bonfire", "title": "Problem 233: Lattice points on a circle", "tests": [ - "assert.strictEqual(euler233(), 271204031455541300, 'message: \u003ccode\u003eeuler233()\u003c/code\u003e should return 271204031455541300.');" + "assert.strictEqual(euler233(), 271204031455541300, 'message: euler233() should return 271204031455541300.');" ], "solutions": [], "translations": {}, @@ -7738,7 +7741,7 @@ "type": "bonfire", "title": "Problem 234: Semidivisible numbers", "tests": [ - "assert.strictEqual(euler234(), 1259187438574927000, 'message: \u003ccode\u003eeuler234()\u003c/code\u003e should return 1259187438574927000.');" + "assert.strictEqual(euler234(), 1259187438574927000, 'message: euler234() should return 1259187438574927000.');" ], "solutions": [], "translations": {}, @@ -7767,7 +7770,7 @@ "type": "bonfire", "title": "Problem 235: An Arithmetic Geometric sequence", "tests": [ - "assert.strictEqual(euler235(), 1.002322108633, 'message: \u003ccode\u003eeuler235()\u003c/code\u003e should return 1.002322108633.');" + "assert.strictEqual(euler235(), 1.002322108633, 'message: euler235() should return 1.002322108633.');" ], "solutions": [], "translations": {}, @@ -7796,7 +7799,7 @@ "type": "bonfire", "title": "Problem 236: Luxury Hampers", "tests": [ - "assert.strictEqual(euler236(), 123 / 59, 'message: \u003ccode\u003eeuler236()\u003c/code\u003e should return 123 / 59.');" + "assert.strictEqual(euler236(), 123 / 59, 'message: euler236() should return 123 / 59.');" ], "solutions": [], "translations": {}, @@ -7816,9 +7819,9 @@ "Although the suppliers try very hard to ship their goods in perfect condition, there is inevitably some spoilage - i.e. products gone bad.", "", "The suppliers compare their performance using two types of statistic:The five per-product spoilage rates for each supplier are equal to the number of products gone bad divided by the number of products supplied, for each of the five products in turn.", - " The overall spoilage rate for each supplier is equal to the total number of products gone bad divided by the total number of products provided by that supplier.To their surprise, the suppliers found that each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A' by the same factor (ratio of spoilage rates), m\u003e1; and yet, paradoxically, the overall spoilage rate was worse for 'A' than for 'B', also by a factor of m.", + " The overall spoilage rate for each supplier is equal to the total number of products gone bad divided by the total number of products provided by that supplier.To their surprise, the suppliers found that each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A' by the same factor (ratio of spoilage rates), m>1; and yet, paradoxically, the overall spoilage rate was worse for 'A' than for 'B', also by a factor of m.", "", - "There are thirty-five m\u003e1 for which this surprising result could have occurred, the smallest of which is 1476/1475.", + "There are thirty-five m>1 for which this surprising result could have occurred, the smallest of which is 1476/1475.", "", "What's the largest possible value of m?", "Give your answer as a fraction reduced to its lowest terms, in the form u/v." @@ -7830,7 +7833,7 @@ "type": "bonfire", "title": "Problem 237: Tours on a 4 x n playing board", "tests": [ - "assert.strictEqual(euler237(), 15836928, 'message: \u003ccode\u003eeuler237()\u003c/code\u003e should return 15836928.');" + "assert.strictEqual(euler237(), 15836928, 'message: euler237() should return 15836928.');" ], "solutions": [], "translations": {}, @@ -7862,7 +7865,7 @@ "type": "bonfire", "title": "Problem 238: Infinite string tour", "tests": [ - "assert.strictEqual(euler238(), 9922545104535660, 'message: \u003ccode\u003eeuler238()\u003c/code\u003e should return 9922545104535660.');" + "assert.strictEqual(euler238(), 9922545104535660, 'message: euler238() should return 9922545104535660.');" ], "solutions": [], "translations": {}, @@ -7906,9 +7909,9 @@ "", "Note that substring 025 starting at position 3, has a sum of digits equal to 7, but there was an earlier substring (starting at position 1) with a sum of digits equal to 7, so p(7) = 1, not 3.", "", - "We can verify that, for 0 \u003c k ≤ 103, ∑ p(k) = 4742.", + "We can verify that, for 0 < k ≤ 103, ∑ p(k) = 4742.", "", - "Find ∑ p(k), for 0 \u003c k ≤ 2·1015." + "Find ∑ p(k), for 0 < k ≤ 2·1015." ] }, { @@ -7917,7 +7920,7 @@ "type": "bonfire", "title": "Problem 239: Twenty-two Foolish Primes", "tests": [ - "assert.strictEqual(euler239(), 0.001887854841, 'message: \u003ccode\u003eeuler239()\u003c/code\u003e should return 0.001887854841.');" + "assert.strictEqual(euler239(), 0.001887854841, 'message: euler239() should return 0.001887854841.');" ], "solutions": [], "translations": {}, @@ -7944,7 +7947,7 @@ "type": "bonfire", "title": "Problem 240: Top Dice", "tests": [ - "assert.strictEqual(euler240(), 7448717393364182000, 'message: \u003ccode\u003eeuler240()\u003c/code\u003e should return 7448717393364182000.');" + "assert.strictEqual(euler240(), 7448717393364182000, 'message: euler240() should return 7448717393364182000.');" ], "solutions": [], "translations": {}, @@ -7977,7 +7980,7 @@ "type": "bonfire", "title": "Problem 241: Perfection Quotients", "tests": [ - "assert.strictEqual(euler241(), 482316491800641150, 'message: \u003ccode\u003eeuler241()\u003c/code\u003e should return 482316491800641150.');" + "assert.strictEqual(euler241(), 482316491800641150, 'message: euler241() should return 482316491800641150.');" ], "solutions": [], "translations": {}, @@ -8007,7 +8010,7 @@ "type": "bonfire", "title": "Problem 242: Odd Triplets", "tests": [ - "assert.strictEqual(euler242(), 997104142249036700, 'message: \u003ccode\u003eeuler242()\u003c/code\u003e should return 997104142249036700.');" + "assert.strictEqual(euler242(), 997104142249036700, 'message: euler242() should return 997104142249036700.');" ], "solutions": [], "translations": {}, @@ -8037,7 +8040,7 @@ "type": "bonfire", "title": "Problem 243: Resilience", "tests": [ - "assert.strictEqual(euler243(), 892371480, 'message: \u003ccode\u003eeuler243()\u003c/code\u003e should return 892371480.');" + "assert.strictEqual(euler243(), 892371480, 'message: euler243() should return 892371480.');" ], "solutions": [], "translations": {}, @@ -8056,9 +8059,9 @@ "", "We shall call a fraction that cannot be cancelled down a resilient fraction.", "Furthermore we shall define the resilience of a denominator, R(d), to be the ratio of its proper fractions that are resilient; for example, R(12) = 4/11 .", - "In fact, d = 12 is the smallest denominator having a resilience R(d) \u003c 4/10 .", + "In fact, d = 12 is the smallest denominator having a resilience R(d) < 4/10 .", "", - "Find the smallest denominator d, having a resilience R(d) \u003c 15499/94744 ." + "Find the smallest denominator d, having a resilience R(d) < 15499/94744 ." ] }, { @@ -8067,7 +8070,7 @@ "type": "bonfire", "title": "Problem 244: Sliders", "tests": [ - "assert.strictEqual(euler244(), 96356848, 'message: \u003ccode\u003eeuler244()\u003c/code\u003e should return 96356848.');" + "assert.strictEqual(euler244(), 96356848, 'message: euler244() should return 96356848.');" ], "solutions": [], "translations": {}, @@ -8114,7 +8117,7 @@ "type": "bonfire", "title": "Problem 245: Coresilience", "tests": [ - "assert.strictEqual(euler245(), 288084712410001, 'message: \u003ccode\u003eeuler245()\u003c/code\u003e should return 288084712410001.');" + "assert.strictEqual(euler245(), 288084712410001, 'message: euler245() should return 288084712410001.');" ], "solutions": [], "translations": {}, @@ -8129,15 +8132,15 @@ "description": [ "We shall call a fraction that cannot be cancelled down a resilient fraction. Furthermore we shall define the resilience of a denominator, R(d), to be the ratio of its proper fractions that are resilient; for example, R(12) = 4⁄11.", "", - "The resilience of a number d \u003e 1 is then", + "The resilience of a number d > 1 is then", "φ(d)d − 1", ", where φ is Euler's totient function.", - "We further define the coresilience of a number n \u003e 1 as C(n)= ", + "We further define the coresilience of a number n > 1 as C(n)= ", "n − φ(n)n − 1.", "The coresilience of a prime p is C(p)", "= ", "1p − 1.", - "Find the sum of all composite integers 1 \u003c n ≤ 2×1011, for which C(n) is a unit fraction." + "Find the sum of all composite integers 1 < n ≤ 2×1011, for which C(n) is a unit fraction." ] }, { @@ -8146,7 +8149,7 @@ "type": "bonfire", "title": "Problem 246: Tangents to an ellipse", "tests": [ - "assert.strictEqual(euler246(), 810834388, 'message: \u003ccode\u003eeuler246()\u003c/code\u003e should return 810834388.');" + "assert.strictEqual(euler246(), 810834388, 'message: euler246() should return 810834388.');" ], "solutions": [], "translations": {}, @@ -8160,7 +8163,7 @@ ], "description": [ "A definition for an ellipse is:", - "Given a circle c with centre M and radius r and a point G such that d(G,M)\u003cr, the locus of the points that are equidistant from c and G form an ellipse.", + "Given a circle c with centre M and radius r and a point G such that d(G,M)euler247() should return 782252.');" ], "solutions": [], "translations": {}, @@ -8223,7 +8226,7 @@ "type": "bonfire", "title": "Problem 248: Numbers for which Euler’s totient function equals 13!", "tests": [ - "assert.strictEqual(euler248(), 23507044290, 'message: \u003ccode\u003eeuler248()\u003c/code\u003e should return 23507044290.');" + "assert.strictEqual(euler248(), 23507044290, 'message: euler248() should return 23507044290.');" ], "solutions": [], "translations": {}, @@ -8246,7 +8249,7 @@ "type": "bonfire", "title": "Problem 249: Prime Subset Sums", "tests": [ - "assert.strictEqual(euler249(), 9275262564250418, 'message: \u003ccode\u003eeuler249()\u003c/code\u003e should return 9275262564250418.');" + "assert.strictEqual(euler249(), 9275262564250418, 'message: euler249() should return 9275262564250418.');" ], "solutions": [], "translations": {}, @@ -8270,7 +8273,7 @@ "type": "bonfire", "title": "Problem 250: 250250", "tests": [ - "assert.strictEqual(euler250(), 1425480602091519, 'message: \u003ccode\u003eeuler250()\u003c/code\u003e should return 1425480602091519.');" + "assert.strictEqual(euler250(), 1425480602091519, 'message: euler250() should return 1425480602091519.');" ], "solutions": [], "translations": {}, @@ -8292,7 +8295,7 @@ "type": "bonfire", "title": "Problem 251: Cardano Triplets", "tests": [ - "assert.strictEqual(euler251(), 18946051, 'message: \u003ccode\u003eeuler251()\u003c/code\u003e should return 18946051.');" + "assert.strictEqual(euler251(), 18946051, 'message: euler251() should return 18946051.');" ], "solutions": [], "translations": {}, @@ -8324,7 +8327,7 @@ "type": "bonfire", "title": "Problem 252: Convex Holes", "tests": [ - "assert.strictEqual(euler252(), 104924, 'message: \u003ccode\u003eeuler252()\u003c/code\u003e should return 104924.');" + "assert.strictEqual(euler252(), 104924, 'message: euler252() should return 104924.');" ], "solutions": [], "translations": {}, @@ -8372,7 +8375,7 @@ "type": "bonfire", "title": "Problem 253: Tidying up", "tests": [ - "assert.strictEqual(euler253(), 11.492847, 'message: \u003ccode\u003eeuler253()\u003c/code\u003e should return 11.492847.');" + "assert.strictEqual(euler253(), 11.492847, 'message: euler253() should return 11.492847.');" ], "solutions": [], "translations": {}, @@ -8412,7 +8415,7 @@ "type": "bonfire", "title": "Problem 254: Sums of Digit Factorials", "tests": [ - "assert.strictEqual(euler254(), 8184523820510, 'message: \u003ccode\u003eeuler254()\u003c/code\u003e should return 8184523820510.');" + "assert.strictEqual(euler254(), 8184523820510, 'message: euler254() should return 8184523820510.');" ], "solutions": [], "translations": {}, @@ -8444,7 +8447,7 @@ "type": "bonfire", "title": "Problem 255: Rounded Square Roots", "tests": [ - "assert.strictEqual(euler255(), 4.447401118, 'message: \u003ccode\u003eeuler255()\u003c/code\u003e should return 4.447401118.');" + "assert.strictEqual(euler255(), 4.447401118, 'message: euler255() should return 4.447401118.');" ], "solutions": [], "translations": {}, @@ -8477,7 +8480,7 @@ "The number of iterations required when using this method is surprisingly low.", "For example, we can find the rounded-square-root of a 5-digit integer (10,000 ≤ n ≤ 99,999) with an average of 3.2102888889 iterations (the average value was rounded to 10 decimal places).", "", - "Using the procedure described above, what is the average number of iterations required to find the rounded-square-root of a 14-digit number (1013 ≤ n \u003c 1014)?", + "Using the procedure described above, what is the average number of iterations required to find the rounded-square-root of a 14-digit number (1013 ≤ n < 1014)?", "Give your answer rounded to 10 decimal places.", "", "Note: The symbols ⌊x⌋ and ⌈x⌉ represent the floor function and ceiling function respectively." @@ -8489,7 +8492,7 @@ "type": "bonfire", "title": "Problem 256: Tatami-Free Rooms", "tests": [ - "assert.strictEqual(euler256(), 85765680, 'message: \u003ccode\u003eeuler256()\u003c/code\u003e should return 85765680.');" + "assert.strictEqual(euler256(), 85765680, 'message: euler256() should return 85765680.');" ], "solutions": [], "translations": {}, @@ -8536,7 +8539,7 @@ "type": "bonfire", "title": "Problem 257: Angular Bisectors", "tests": [ - "assert.strictEqual(euler257(), 139012411, 'message: \u003ccode\u003eeuler257()\u003c/code\u003e should return 139012411.');" + "assert.strictEqual(euler257(), 139012411, 'message: euler257() should return 139012411.');" ], "solutions": [], "translations": {}, @@ -8570,7 +8573,7 @@ "type": "bonfire", "title": "Problem 258: A lagged Fibonacci sequence", "tests": [ - "assert.strictEqual(euler258(), 12747994, 'message: \u003ccode\u003eeuler258()\u003c/code\u003e should return 12747994.');" + "assert.strictEqual(euler258(), 12747994, 'message: euler258() should return 12747994.');" ], "solutions": [], "translations": {}, @@ -8596,7 +8599,7 @@ "type": "bonfire", "title": "Problem 259: Reachable Numbers", "tests": [ - "assert.strictEqual(euler259(), 20101196798, 'message: \u003ccode\u003eeuler259()\u003c/code\u003e should return 20101196798.');" + "assert.strictEqual(euler259(), 20101196798, 'message: euler259() should return 20101196798.');" ], "solutions": [], "translations": {}, @@ -8628,7 +8631,7 @@ "type": "bonfire", "title": "Problem 260: Stone Game", "tests": [ - "assert.strictEqual(euler260(), 167542057, 'message: \u003ccode\u003eeuler260()\u003c/code\u003e should return 167542057.');" + "assert.strictEqual(euler260(), 167542057, 'message: euler260() should return 167542057.');" ], "solutions": [], "translations": {}, @@ -8644,7 +8647,7 @@ "A game is played with three piles of stones and two players.", "At her turn, a player removes one or more stones from the piles. However, if she takes stones from more than one pile, she must remove the same number of stones from each of the selected piles.", "", - "In other words, the player chooses some N\u003e0 and removes:", + "In other words, the player chooses some N>0 and removes:", "N stones from any single pile; or", "N stones from each of any two piles (2N total); or", "N stones from each of the three piles (3N total).", @@ -8669,7 +8672,7 @@ "type": "bonfire", "title": "Problem 261: Pivotal Square Sums", "tests": [ - "assert.strictEqual(euler261(), 238890850232021, 'message: \u003ccode\u003eeuler261()\u003c/code\u003e should return 238890850232021.');" + "assert.strictEqual(euler261(), 238890850232021, 'message: euler261() should return 238890850232021.');" ], "solutions": [], "translations": {}, @@ -8682,7 +8685,7 @@ "euler261();" ], "description": [ - "Let us call a positive integer k a square-pivot, if there is a pair of integers m \u003e 0 and n ≥ k, such that the sum of the (m+1) consecutive squares up to k equals the sum of the m consecutive squares from (n+1) on:", + "Let us call a positive integer k a square-pivot, if there is a pair of integers m > 0 and n ≥ k, such that the sum of the (m+1) consecutive squares up to k equals the sum of the m consecutive squares from (n+1) on:", "", "(k-m)2 + ... + k2 = (n+1)2 + ... + (n+m)2.", "", @@ -8700,7 +8703,7 @@ "type": "bonfire", "title": "Problem 262: Mountain Range", "tests": [ - "assert.strictEqual(euler262(), 2531.205, 'message: \u003ccode\u003eeuler262()\u003c/code\u003e should return 2531.205.');" + "assert.strictEqual(euler262(), 2531.205, 'message: euler262() should return 2531.205.');" ], "solutions": [], "translations": {}, @@ -8737,7 +8740,7 @@ "type": "bonfire", "title": "Problem 263: An engineers' dream come true", "tests": [ - "assert.strictEqual(euler263(), 2039506520, 'message: \u003ccode\u003eeuler263()\u003c/code\u003e should return 2039506520.');" + "assert.strictEqual(euler263(), 2039506520, 'message: euler263() should return 2039506520.');" ], "solutions": [], "translations": {}, @@ -8778,7 +8781,7 @@ "type": "bonfire", "title": "Problem 264: Triangle Centres", "tests": [ - "assert.strictEqual(euler264(), 2816417.1055, 'message: \u003ccode\u003eeuler264()\u003c/code\u003e should return 2816417.1055.');" + "assert.strictEqual(euler264(), 2816417.1055, 'message: euler264() should return 2816417.1055.');" ], "solutions": [], "translations": {}, @@ -8820,7 +8823,7 @@ "type": "bonfire", "title": "Problem 265: Binary Circles", "tests": [ - "assert.strictEqual(euler265(), 209110240768, 'message: \u003ccode\u003eeuler265()\u003c/code\u003e should return 209110240768.');" + "assert.strictEqual(euler265(), 209110240768, 'message: euler265() should return 209110240768.');" ], "solutions": [], "translations": {}, @@ -8855,7 +8858,7 @@ "type": "bonfire", "title": "Problem 266: Pseudo Square Root", "tests": [ - "assert.strictEqual(euler266(), 1096883702440585, 'message: \u003ccode\u003eeuler266()\u003c/code\u003e should return 1096883702440585.');" + "assert.strictEqual(euler266(), 1096883702440585, 'message: euler266() should return 1096883702440585.');" ], "solutions": [], "translations": {}, @@ -8884,7 +8887,7 @@ "type": "bonfire", "title": "Problem 267: Billionaire", "tests": [ - "assert.strictEqual(euler267(), 0.999992836187, 'message: \u003ccode\u003eeuler267()\u003c/code\u003e should return 0.999992836187.');" + "assert.strictEqual(euler267(), 0.999992836187, 'message: euler267() should return 0.999992836187.');" ], "solutions": [], "translations": {}, @@ -8911,7 +8914,7 @@ "type": "bonfire", "title": "Problem 268: Counting numbers with at least four distinct prime factors less than 100", "tests": [ - "assert.strictEqual(euler268(), 785478606870985, 'message: \u003ccode\u003eeuler268()\u003c/code\u003e should return 785478606870985.');" + "assert.strictEqual(euler268(), 785478606870985, 'message: euler268() should return 785478606870985.');" ], "solutions": [], "translations": {}, @@ -8935,7 +8938,7 @@ "type": "bonfire", "title": "Problem 269: Polynomials with at least one integer root", "tests": [ - "assert.strictEqual(euler269(), 1311109198529286, 'message: \u003ccode\u003eeuler269()\u003c/code\u003e should return 1311109198529286.');" + "assert.strictEqual(euler269(), 1311109198529286, 'message: euler269() should return 1311109198529286.');" ], "solutions": [], "translations": {}, @@ -8967,7 +8970,7 @@ "type": "bonfire", "title": "Problem 270: Cutting Squares", "tests": [ - "assert.strictEqual(euler270(), 82282080, 'message: \u003ccode\u003eeuler270()\u003c/code\u003e should return 82282080.');" + "assert.strictEqual(euler270(), 82282080, 'message: euler270() should return 82282080.');" ], "solutions": [], "translations": {}, @@ -8996,7 +8999,7 @@ "type": "bonfire", "title": "Problem 271: Modular Cubes, part 1", "tests": [ - "assert.strictEqual(euler271(), 4617456485273130000, 'message: \u003ccode\u003eeuler271()\u003c/code\u003e should return 4617456485273130000.');" + "assert.strictEqual(euler271(), 4617456485273130000, 'message: euler271() should return 4617456485273130000.');" ], "solutions": [], "translations": {}, @@ -9009,7 +9012,7 @@ "euler271();" ], "description": [ - "For a positive number n, define S(n) as the sum of the integers x, for which 1\u003cx\u003cn andx3≡1 mod n.", + "For a positive number n, define S(n) as the sum of the integers x, for which 1euler272() should return 8495585919506151000.');" ], "solutions": [], "translations": {}, @@ -9037,7 +9040,7 @@ "euler272();" ], "description": [ - "For a positive number n, define C(n) as the number of the integers x, for which 1\u003cx\u003cn andx3≡1 mod n.", + "For a positive number n, define C(n) as the number of the integers x, for which 1euler273() should return 2032447591196869000.');" ], "solutions": [], "translations": {}, @@ -9071,7 +9074,7 @@ "a=1, b=8 and a=4, b=7.", "We call S(N) the sum of the values of a of all solutions of a2 + b2 = N, 0 ≤ a ≤ b, a, b and N integer.", "Thus S(65) = 1 + 4 = 5.", - "Find ∑S(N), for all squarefree N only divisible by primes of the form 4k+1 with 4k+1 \u003c 150." + "Find ∑S(N), for all squarefree N only divisible by primes of the form 4k+1 with 4k+1 < 150." ] }, { @@ -9080,7 +9083,7 @@ "type": "bonfire", "title": "Problem 274: Divisibility Multipliers", "tests": [ - "assert.strictEqual(euler274(), 1601912348822, 'message: \u003ccode\u003eeuler274()\u003c/code\u003e should return 1601912348822.');" + "assert.strictEqual(euler274(), 1601912348822, 'message: euler274() should return 1601912348822.');" ], "solutions": [], "translations": {}, @@ -9093,7 +9096,7 @@ "euler274();" ], "description": [ - "For each integer p \u003e 1 coprime to 10 there is a positive divisibility multiplier m \u003c p which preserves divisibility by p for the following function on any positive integer, n:", + "For each integer p > 1 coprime to 10 there is a positive divisibility multiplier m < p which preserves divisibility by p for the following function on any positive integer, n:", "", "f(n) = (all but the last digit of n) + (the last digit of n) * m", "", @@ -9114,7 +9117,7 @@ "type": "bonfire", "title": "Problem 275: Balanced Sculptures", "tests": [ - "assert.strictEqual(euler275(), 15030564, 'message: \u003ccode\u003eeuler275()\u003c/code\u003e should return 15030564.');" + "assert.strictEqual(euler275(), 15030564, 'message: euler275() should return 15030564.');" ], "solutions": [], "translations": {}, @@ -9144,7 +9147,7 @@ "type": "bonfire", "title": "Problem 276: Primitive Triangles", "tests": [ - "assert.strictEqual(euler276(), 5777137137739633000, 'message: \u003ccode\u003eeuler276()\u003c/code\u003e should return 5777137137739633000.');" + "assert.strictEqual(euler276(), 5777137137739633000, 'message: euler276() should return 5777137137739633000.');" ], "solutions": [], "translations": {}, @@ -9168,7 +9171,7 @@ "type": "bonfire", "title": "Problem 277: A Modified Collatz sequence", "tests": [ - "assert.strictEqual(euler277(), 1125977393124310, 'message: \u003ccode\u003eeuler277()\u003c/code\u003e should return 1125977393124310.');" + "assert.strictEqual(euler277(), 1125977393124310, 'message: euler277() should return 1125977393124310.');" ], "solutions": [], "translations": {}, @@ -9202,10 +9205,10 @@ "", "Of course, there are other sequences that begin with that same sequence \"DdDddUUdDD....\".", "For instance, if a1=1004064, then the sequence is DdDddUUdDDDdUDUUUdDdUUDDDUdDD.", - "In fact, 1004064 is the smallest possible a1 \u003e 106 that begins with the sequence DdDddUUdDD.", + "In fact, 1004064 is the smallest possible a1 > 106 that begins with the sequence DdDddUUdDD.", "", "", - "What is the smallest a1 \u003e 1015 that begins with the sequence \"UDDDUdddDDUDDddDdDddDDUDDdUUDd\"?" + "What is the smallest a1 > 1015 that begins with the sequence \"UDDDUdddDDUDDddDdDddDDUDDdUUDd\"?" ] }, { @@ -9214,7 +9217,7 @@ "type": "bonfire", "title": "Problem 278: Linear Combinations of Semiprimes", "tests": [ - "assert.strictEqual(euler278(), 1228215747273908500, 'message: \u003ccode\u003eeuler278()\u003c/code\u003e should return 1228215747273908500.');" + "assert.strictEqual(euler278(), 1228215747273908500, 'message: euler278() should return 1228215747273908500.');" ], "solutions": [], "translations": {}, @@ -9227,7 +9230,7 @@ "euler278();" ], "description": [ - "Given the values of integers 1 \u003c a1 \u003c a2 \u003c... \u003c an, consider the linear combinationq1a1 + q2a2 + ... + qnan = b, using only integer values qk ≥ 0. ", + "Given the values of integers 1 < a1 < a2 <... < an, consider the linear combinationq1a1 + q2a2 + ... + qnan = b, using only integer values qk ≥ 0. ", "", "", "Note that for a given set of ak, it may be that not all values of b are possible.", @@ -9237,7 +9240,7 @@ "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(p*q,p*r,q*r), where p, q and r are prime numbers and p \u003c q \u003c r \u003c 5000." + "Find ∑ f(p*q,p*r,q*r), where p, q and r are prime numbers and p < q < r < 5000." ] }, { @@ -9246,7 +9249,7 @@ "type": "bonfire", "title": "Problem 279: Triangles with integral sides and an integral angle", "tests": [ - "assert.strictEqual(euler279(), 416577688, 'message: \u003ccode\u003eeuler279()\u003c/code\u003e should return 416577688.');" + "assert.strictEqual(euler279(), 416577688, 'message: euler279() should return 416577688.');" ], "solutions": [], "translations": {}, @@ -9268,7 +9271,7 @@ "type": "bonfire", "title": "Problem 280: Ant and seeds", "tests": [ - "assert.strictEqual(euler280(), 430.088247, 'message: \u003ccode\u003eeuler280()\u003c/code\u003e should return 430.088247.');" + "assert.strictEqual(euler280(), 430.088247, 'message: euler280() should return 430.088247.');" ], "solutions": [], "translations": {}, @@ -9295,7 +9298,7 @@ "type": "bonfire", "title": "Problem 281: Pizza Toppings", "tests": [ - "assert.strictEqual(euler281(), 1485776387445623, 'message: \u003ccode\u003eeuler281()\u003c/code\u003e should return 1485776387445623.');" + "assert.strictEqual(euler281(), 1485776387445623, 'message: euler281() should return 1485776387445623.');" ], "solutions": [], "translations": {}, @@ -9325,7 +9328,7 @@ "type": "bonfire", "title": "Problem 282: The Ackermann function", "tests": [ - "assert.strictEqual(euler282(), 1098988351, 'message: \u003ccode\u003eeuler282()\u003c/code\u003e should return 1098988351.');" + "assert.strictEqual(euler282(), 1098988351, 'message: euler282() should return 1098988351.');" ], "solutions": [], "translations": {}, @@ -9354,7 +9357,7 @@ "type": "bonfire", "title": "Problem 283: Integer sided triangles for which the area/perimeter ratio is integral", "tests": [ - "assert.strictEqual(euler283(), 28038042525570324, 'message: \u003ccode\u003eeuler283()\u003c/code\u003e should return 28038042525570324.');" + "assert.strictEqual(euler283(), 28038042525570324, 'message: euler283() should return 28038042525570324.');" ], "solutions": [], "translations": {}, @@ -9382,7 +9385,7 @@ "type": "bonfire", "title": "Problem 284: Steady Squares", "tests": [ - "assert.strictEqual(euler284(), 5a411d7b, 'message: \u003ccode\u003eeuler284()\u003c/code\u003e should return 5a411d7b.');" + "assert.strictEqual(euler284(), 5a411d7b, 'message: euler284() should return 5a411d7b.');" ], "solutions": [], "translations": {}, @@ -9411,7 +9414,7 @@ "type": "bonfire", "title": "Problem 285: Pythagorean odds", "tests": [ - "assert.strictEqual(euler285(), 157055.80999, 'message: \u003ccode\u003eeuler285()\u003c/code\u003e should return 157055.80999.');" + "assert.strictEqual(euler285(), 157055.80999, 'message: euler285() should return 157055.80999.');" ], "solutions": [], "translations": {}, @@ -9442,7 +9445,7 @@ "type": "bonfire", "title": "Problem 286: Scoring probabilities", "tests": [ - "assert.strictEqual(euler286(), 52.6494571953, 'message: \u003ccode\u003eeuler286()\u003c/code\u003e should return 52.6494571953.');" + "assert.strictEqual(euler286(), 52.6494571953, 'message: euler286() should return 52.6494571953.');" ], "solutions": [], "translations": {}, @@ -9468,7 +9471,7 @@ "type": "bonfire", "title": "Problem 287: Quadtree encoding (a simple compression algorithm)", "tests": [ - "assert.strictEqual(euler287(), 313135496, 'message: \u003ccode\u003eeuler287()\u003c/code\u003e should return 313135496.');" + "assert.strictEqual(euler287(), 313135496, 'message: euler287() should return 313135496.');" ], "solutions": [], "translations": {}, @@ -9505,7 +9508,7 @@ "type": "bonfire", "title": "Problem 288: An enormous factorial", "tests": [ - "assert.strictEqual(euler288(), 605857431263982000, 'message: \u003ccode\u003eeuler288()\u003c/code\u003e should return 605857431263982000.');" + "assert.strictEqual(euler288(), 605857431263982000, 'message: euler288() should return 605857431263982000.');" ], "solutions": [], "translations": {}, @@ -9542,7 +9545,7 @@ "type": "bonfire", "title": "Problem 289: Eulerian Cycles", "tests": [ - "assert.strictEqual(euler289(), 6567944538, 'message: \u003ccode\u003eeuler289()\u003c/code\u003e should return 6567944538.');" + "assert.strictEqual(euler289(), 6567944538, 'message: euler289() should return 6567944538.');" ], "solutions": [], "translations": {}, @@ -9558,7 +9561,7 @@ "Let C(x,y) be a circle passing through the points (x, y), (x, y+1), (x+1, y) and (x+1, y+1).", "", "For positive integers m and n, let E(m,n) be a configuration which consists of the m·n circles:", - "{ C(x,y): 0 ≤ x \u003c m, 0 ≤ y \u003c n, x and y are integers }", + "{ C(x,y): 0 ≤ x < m, 0 ≤ y < n, x and y are integers }", "", "An Eulerian cycle on E(m,n) is a closed path that passes through each arc exactly once.", "Many such paths are possible on E(m,n), but we are only interested in those which are not self-crossing: ", @@ -9578,7 +9581,7 @@ "type": "bonfire", "title": "Problem 290: Digital Signature", "tests": [ - "assert.strictEqual(euler290(), 20444710234716470, 'message: \u003ccode\u003eeuler290()\u003c/code\u003e should return 20444710234716470.');" + "assert.strictEqual(euler290(), 20444710234716470, 'message: euler290() should return 20444710234716470.');" ], "solutions": [], "translations": {}, @@ -9591,7 +9594,7 @@ "euler290();" ], "description": [ - "How many integers 0 ≤ n \u003c 1018 have the property that the sum of the digits of n equals the sum of digits of 137n?" + "How many integers 0 ≤ n < 1018 have the property that the sum of the digits of n equals the sum of digits of 137n?" ] }, { @@ -9600,7 +9603,7 @@ "type": "bonfire", "title": "Problem 291: Panaitopol Primes", "tests": [ - "assert.strictEqual(euler291(), 4037526, 'message: \u003ccode\u003eeuler291()\u003c/code\u003e should return 4037526.');" + "assert.strictEqual(euler291(), 4037526, 'message: euler291() should return 4037526.');" ], "solutions": [], "translations": {}, @@ -9625,7 +9628,7 @@ "type": "bonfire", "title": "Problem 292: Pythagorean Polygons", "tests": [ - "assert.strictEqual(euler292(), 3600060866, 'message: \u003ccode\u003eeuler292()\u003c/code\u003e should return 3600060866.');" + "assert.strictEqual(euler292(), 3600060866, 'message: euler292() should return 3600060866.');" ], "solutions": [], "translations": {}, @@ -9654,7 +9657,7 @@ "type": "bonfire", "title": "Problem 293: Pseudo-Fortunate Numbers", "tests": [ - "assert.strictEqual(euler293(), 2209, 'message: \u003ccode\u003eeuler293()\u003c/code\u003e should return 2209.');" + "assert.strictEqual(euler293(), 2209, 'message: euler293() should return 2209.');" ], "solutions": [], "translations": {}, @@ -9671,7 +9674,7 @@ "The first twelve admissible numbers are 2,4,6,8,12,16,18,24,30,32,36,48.", "", "", - "If N is admissible, the smallest integer M \u003e 1 such that N+M is prime, will be called the pseudo-Fortunate number for N.", + "If N is admissible, the smallest integer M > 1 such that N+M is prime, will be called the pseudo-Fortunate number for N.", "", "", "For example, N=630 is admissible since it is even and its distinct prime factors are the consecutive primes 2,3,5 and 7. ", @@ -9688,7 +9691,7 @@ "type": "bonfire", "title": "Problem 294: Sum of digits - experience #23", "tests": [ - "assert.strictEqual(euler294(), 789184709, 'message: \u003ccode\u003eeuler294()\u003c/code\u003e should return 789184709.');" + "assert.strictEqual(euler294(), 789184709, 'message: euler294() should return 789184709.');" ], "solutions": [], "translations": {}, @@ -9705,7 +9708,7 @@ "Thus d(42) = 4+2 = 6.", "", "", - "For a positive integer n, define S(n) as the number of positive integers k \u003c 10n with the following properties :", + "For a positive integer n, define S(n) as the number of positive integers k < 10n with the following properties :", "k is divisible by 23 and", "d(k) = 23.", "", @@ -9721,7 +9724,7 @@ "type": "bonfire", "title": "Problem 295: Lenticular holes", "tests": [ - "assert.strictEqual(euler295(), 4884650818, 'message: \u003ccode\u003eeuler295()\u003c/code\u003e should return 4884650818.');" + "assert.strictEqual(euler295(), 4884650818, 'message: euler295() should return 4884650818.');" ], "solutions": [], "translations": {}, @@ -9753,7 +9756,7 @@ "We call an ordered pair of positive real numbers (r1, r2) a lenticular pair if there exist two circles with radii r1 and r2 that form a lenticular hole.", "We can verify that (1, 5) and (5, √65) are the lenticular pairs of the example above.", "", - "Let L(N) be the number of distinct lenticular pairs (r1, r2) for which 0 \u003c r1 ≤ r2 ≤ N.", + "Let L(N) be the number of distinct lenticular pairs (r1, r2) for which 0 < r1 ≤ r2 ≤ N.", "We can verify that L(10) = 30 and L(100) = 3442.", "", "Find L(100 000)." @@ -9765,7 +9768,7 @@ "type": "bonfire", "title": "Problem 296: Angular Bisector and Tangent", "tests": [ - "assert.strictEqual(euler296(), 1137208419, 'message: \u003ccode\u003eeuler296()\u003c/code\u003e should return 1137208419.');" + "assert.strictEqual(euler296(), 1137208419, 'message: euler296() should return 1137208419.');" ], "solutions": [], "translations": {}, @@ -9792,7 +9795,7 @@ "type": "bonfire", "title": "Problem 297: Zeckendorf Representation", "tests": [ - "assert.strictEqual(euler297(), 2252639041804718000, 'message: \u003ccode\u003eeuler297()\u003c/code\u003e should return 2252639041804718000.');" + "assert.strictEqual(euler297(), 2252639041804718000, 'message: euler297() should return 2252639041804718000.');" ], "solutions": [], "translations": {}, @@ -9811,11 +9814,11 @@ "Every positive integer can be uniquely written as a sum of nonconsecutive terms of the Fibonacci sequence. For example, 100 = 3 + 8 + 89.", "Such a sum is called the Zeckendorf representation of the number.", "", - "For any integer n\u003e0, let z(n) be the number of terms in the Zeckendorf representation of n.", + "For any integer n>0, let z(n) be the number of terms in the Zeckendorf representation of n.", "Thus, z(5) = 1, z(14) = 2, z(100) = 3 etc.", - "Also, for 0\u003cn\u003c106, ∑ z(n) = 7894453.", + "Also, for 0euler298() should return 1.76882294.');" ], "solutions": [], "translations": {}, @@ -9920,7 +9923,7 @@ "type": "bonfire", "title": "Problem 299: Three similar triangles", "tests": [ - "assert.strictEqual(euler299(), 549936643, 'message: \u003ccode\u003eeuler299()\u003c/code\u003e should return 549936643.');" + "assert.strictEqual(euler299(), 549936643, 'message: euler299() should return 549936643.');" ], "solutions": [], "translations": {}, @@ -9934,7 +9937,7 @@ ], "description": [ "Four points with integer coordinates are selected:A(a, 0), B(b, 0), C(0, c) and D(0, d), ", - "with 0 \u003c a \u003c b and 0 \u003c c \u003c d.", + "with 0 < a < b and 0 < c < d.", "Point P, also with integer coordinates, is chosen on the line AC so that the three triangles ABP, CDP and BDP are all similar.", "", "It is easy to prove that the three triangles can be similar, only if a=c.", @@ -9944,9 +9947,9 @@ "For example, if (a,b,d)=(2,3,4), it can be easily verified that point P(1,1) satisfies the above condition. ", "Note that the triplets (2,3,4) and (2,4,3) are considered as distinct, although point P(1,1) is common for both.", "", - "If b+d \u003c 100, there are 92 distinct triplets (a,b,d) such that point P exists.", - "If b+d \u003c 100 000, there are 320471 distinct triplets (a,b,d) such that point P exists.", - "If b+d \u003c 100 000 000, how many distinct triplets (a,b,d) are there such that point P exists?" + "If b+d < 100, there are 92 distinct triplets (a,b,d) such that point P exists.", + "If b+d < 100 000, there are 320471 distinct triplets (a,b,d) such that point P exists.", + "If b+d < 100 000 000, how many distinct triplets (a,b,d) are there such that point P exists?" ] }, { @@ -9955,7 +9958,7 @@ "type": "bonfire", "title": "Problem 300: Protein folding", "tests": [ - "assert.strictEqual(euler300(), 8.0540771484375, 'message: \u003ccode\u003eeuler300()\u003c/code\u003e should return 8.0540771484375.');" + "assert.strictEqual(euler300(), 8.0540771484375, 'message: euler300() should return 8.0540771484375.');" ], "solutions": [], "translations": {}, @@ -9994,7 +9997,7 @@ "type": "bonfire", "title": "Problem 301: Nim", "tests": [ - "assert.strictEqual(euler301(), 2178309, 'message: \u003ccode\u003eeuler301()\u003c/code\u003e should return 2178309.');" + "assert.strictEqual(euler301(), 2178309, 'message: euler301() should return 2178309.');" ], "solutions": [], "translations": {}, @@ -10031,7 +10034,7 @@ "type": "bonfire", "title": "Problem 302: Strong Achilles Numbers", "tests": [ - "assert.strictEqual(euler302(), 1170060, 'message: \u003ccode\u003eeuler302()\u003c/code\u003e should return 1170060.');" + "assert.strictEqual(euler302(), 1170060, 'message: euler302() should return 1170060.');" ], "solutions": [], "translations": {}, @@ -10071,7 +10074,7 @@ "type": "bonfire", "title": "Problem 303: Multiples with small digits", "tests": [ - "assert.strictEqual(euler303(), 1111981904675169, 'message: \u003ccode\u003eeuler303()\u003c/code\u003e should return 1111981904675169.');" + "assert.strictEqual(euler303(), 1111981904675169, 'message: euler303() should return 1111981904675169.');" ], "solutions": [], "translations": {}, @@ -10097,7 +10100,7 @@ "type": "bonfire", "title": "Problem 304: Primonacci", "tests": [ - "assert.strictEqual(euler304(), 283988410192, 'message: \u003ccode\u003eeuler304()\u003c/code\u003e should return 283988410192.');" + "assert.strictEqual(euler304(), 283988410192, 'message: euler304() should return 283988410192.');" ], "solutions": [], "translations": {}, @@ -10110,15 +10113,15 @@ "euler304();" ], "description": [ - "For any positive integer n the function next_prime(n) returns the smallest prime p such that p\u003en.", + "For any positive integer n the function next_prime(n) returns the smallest prime p such that p>n.", "", "", "The sequence a(n) is defined by:", - "a(1)=next_prime(1014) and a(n)=next_prime(a(n-1)) for n\u003e1.", + "a(1)=next_prime(1014) and a(n)=next_prime(a(n-1)) for n>1.", "", "", "The fibonacci sequence f(n) is defined by:", - "f(0)=0, f(1)=1 and f(n)=f(n-1)+f(n-2) for n\u003e1.", + "f(0)=0, f(1)=1 and f(n)=f(n-1)+f(n-2) for n>1.", "", "", "The sequence b(n) is defined as f(a(n)).", @@ -10134,7 +10137,7 @@ "type": "bonfire", "title": "Problem 305: Reflexive Position", "tests": [ - "assert.strictEqual(euler305(), 18174995535140, 'message: \u003ccode\u003eeuler305()\u003c/code\u003e should return 18174995535140.');" + "assert.strictEqual(euler305(), 18174995535140, 'message: euler305() should return 18174995535140.');" ], "solutions": [], "translations": {}, @@ -10167,7 +10170,7 @@ "type": "bonfire", "title": "Problem 306: Paper-strip Game", "tests": [ - "assert.strictEqual(euler306(), 852938, 'message: \u003ccode\u003eeuler306()\u003c/code\u003e should return 852938.');" + "assert.strictEqual(euler306(), 852938, 'message: euler306() should return 852938.');" ], "solutions": [], "translations": {}, @@ -10206,7 +10209,7 @@ "type": "bonfire", "title": "Problem 307: Chip Defects", "tests": [ - "assert.strictEqual(euler307(), 0.7311720251, 'message: \u003ccode\u003eeuler307()\u003c/code\u003e should return 0.7311720251.');" + "assert.strictEqual(euler307(), 0.7311720251, 'message: euler307() should return 0.7311720251.');" ], "solutions": [], "translations": {}, @@ -10235,7 +10238,7 @@ "type": "bonfire", "title": "Problem 308: An amazing Prime-generating Automaton", "tests": [ - "assert.strictEqual(euler308(), 1539669807660924, 'message: \u003ccode\u003eeuler308()\u003c/code\u003e should return 1539669807660924.');" + "assert.strictEqual(euler308(), 1539669807660924, 'message: euler308() should return 1539669807660924.');" ], "solutions": [], "translations": {}, @@ -10295,7 +10298,7 @@ "type": "bonfire", "title": "Problem 309: Integer Ladders", "tests": [ - "assert.strictEqual(euler309(), 210139, 'message: \u003ccode\u003eeuler309()\u003c/code\u003e should return 210139.');" + "assert.strictEqual(euler309(), 210139, 'message: euler309() should return 210139.');" ], "solutions": [], "translations": {}, @@ -10315,10 +10318,10 @@ "Here, we are only concerned with instances where all four variables are positive integers.", "For example, if x = 70, y = 119 and h = 30, we can calculate that w = 56.", "", - "In fact, for integer values x, y, h and 0 \u003c x \u003c y \u003c 200, there are only five triplets (x,y,h) producing integer solutions for w:", + "In fact, for integer values x, y, h and 0 < x < y < 200, there are only five triplets (x,y,h) producing integer solutions for w:", "(70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) and (119, 175, 40).", "", - "For integer values x, y, h and 0 \u003c x \u003c y \u003c 1 000 000, how many triplets (x,y,h) produce integer solutions for w?" + "For integer values x, y, h and 0 < x < y < 1 000 000, how many triplets (x,y,h) produce integer solutions for w?" ] }, { @@ -10327,7 +10330,7 @@ "type": "bonfire", "title": "Problem 310: Nim Square", "tests": [ - "assert.strictEqual(euler310(), 2586528661783, 'message: \u003ccode\u003eeuler310()\u003c/code\u003e should return 2586528661783.');" + "assert.strictEqual(euler310(), 2586528661783, 'message: euler310() should return 2586528661783.');" ], "solutions": [], "translations": {}, @@ -10355,7 +10358,7 @@ "type": "bonfire", "title": "Problem 311: Biclinic Integral Quadrilaterals", "tests": [ - "assert.strictEqual(euler311(), 2466018557, 'message: \u003ccode\u003eeuler311()\u003c/code\u003e should return 2466018557.');" + "assert.strictEqual(euler311(), 2466018557, 'message: euler311() should return 2466018557.');" ], "solutions": [], "translations": {}, @@ -10368,7 +10371,7 @@ "euler311();" ], "description": [ - "ABCD is a convex, integer sided quadrilateral with 1 ≤ AB \u003c BC \u003c CD \u003c AD.", + "ABCD is a convex, integer sided quadrilateral with 1 ≤ AB < BC < CD < AD.", "BD has integer length. O is the midpoint of BD. AO has integer length.", "We'll call ABCD a biclinic integral quadrilateral if AO = CO ≤ BO = DO.", "", @@ -10391,7 +10394,7 @@ "type": "bonfire", "title": "Problem 312: Cyclic paths on Sierpiński graphs", "tests": [ - "assert.strictEqual(euler312(), 324681947, 'message: \u003ccode\u003eeuler312()\u003c/code\u003e should return 324681947.');" + "assert.strictEqual(euler312(), 324681947, 'message: euler312() should return 324681947.');" ], "solutions": [], "translations": {}, @@ -10431,7 +10434,7 @@ "type": "bonfire", "title": "Problem 313: Sliding game", "tests": [ - "assert.strictEqual(euler313(), 2057774861813004, 'message: \u003ccode\u003eeuler313()\u003c/code\u003e should return 2057774861813004.');" + "assert.strictEqual(euler313(), 2057774861813004, 'message: euler313() should return 2057774861813004.');" ], "solutions": [], "translations": {}, @@ -10452,9 +10455,9 @@ "", "", "", - "There are exactly 5482 grids for which S(m,n) = p2, where p \u003c 100 is prime.", + "There are exactly 5482 grids for which S(m,n) = p2, where p < 100 is prime.", "", - "How many grids does S(m,n) = p2, where p \u003c 106 is prime?" + "How many grids does S(m,n) = p2, where p < 106 is prime?" ] }, { @@ -10463,7 +10466,7 @@ "type": "bonfire", "title": "Problem 314: The Mouse on the Moon", "tests": [ - "assert.strictEqual(euler314(), 132.52756426, 'message: \u003ccode\u003eeuler314()\u003c/code\u003e should return 132.52756426.');" + "assert.strictEqual(euler314(), 132.52756426, 'message: euler314() should return 132.52756426.');" ], "solutions": [], "translations": {}, @@ -10502,7 +10505,7 @@ "type": "bonfire", "title": "Problem 315: Digital root clocks", "tests": [ - "assert.strictEqual(euler315(), 13625242, 'message: \u003ccode\u003eeuler315()\u003c/code\u003e should return 13625242.');" + "assert.strictEqual(euler315(), 13625242, 'message: euler315() should return 13625242.');" ], "solutions": [], "translations": {}, @@ -10570,7 +10573,7 @@ "type": "bonfire", "title": "Problem 316: Numbers in decimal expansions", "tests": [ - "assert.strictEqual(euler316(), 542934735751917760, 'message: \u003ccode\u003eeuler316()\u003c/code\u003e should return 542934735751917760.');" + "assert.strictEqual(euler316(), 542934735751917760, 'message: euler316() should return 542934735751917760.');" ], "solutions": [], "translations": {}, @@ -10606,7 +10609,7 @@ "type": "bonfire", "title": "Problem 317: Firecracker", "tests": [ - "assert.strictEqual(euler317(), 1856532.8455, 'message: \u003ccode\u003eeuler317()\u003c/code\u003e should return 1856532.8455.');" + "assert.strictEqual(euler317(), 1856532.8455, 'message: euler317() should return 1856532.8455.');" ], "solutions": [], "translations": {}, @@ -10635,7 +10638,7 @@ "type": "bonfire", "title": "Problem 318: 2011 nines", "tests": [ - "assert.strictEqual(euler318(), 709313889, 'message: \u003ccode\u003eeuler318()\u003c/code\u003e should return 709313889.');" + "assert.strictEqual(euler318(), 709313889, 'message: euler318() should return 709313889.');" ], "solutions": [], "translations": {}, @@ -10664,7 +10667,7 @@ "In fact it can be proven that the fractional part of (√2+√3)2n approaches 1 for large n.", "", "", - "Consider all real numbers of the form √p+√q with p and q positive integers and p\u003cq, such that the fractional part ", + "Consider all real numbers of the form √p+√q with p and q positive integers and peuler319() should return 268457129.');" ], "solutions": [], "translations": {}, @@ -10698,8 +10701,8 @@ "description": [ "Let x1, x2,..., xn be a sequence of length n such that:", "x1 = 2", - "for all 1 \u003c i ≤ n : xi-1 \u003c xi", - "for all i and j with 1 ≤ i, j ≤ n : (xi) j \u003c (xj + 1)i", + "for all 1 < i ≤ n : xi-1 < xi", + "for all i and j with 1 ≤ i, j ≤ n : (xi) j < (xj + 1)i", "", "There are only five such sequences of length 2, namely:", "{2,4}, {2,5}, {2,6}, {2,7} and {2,8}.", @@ -10720,7 +10723,7 @@ "type": "bonfire", "title": "Problem 320: Factorials divisible by a huge integer", "tests": [ - "assert.strictEqual(euler320(), 278157919195482660, 'message: \u003ccode\u003eeuler320()\u003c/code\u003e should return 278157919195482660.');" + "assert.strictEqual(euler320(), 278157919195482660, 'message: euler320() should return 278157919195482660.');" ], "solutions": [], "translations": {}, @@ -10750,7 +10753,7 @@ "type": "bonfire", "title": "Problem 321: Swapping Counters", "tests": [ - "assert.strictEqual(euler321(), 2470433131948040, 'message: \u003ccode\u003eeuler321()\u003c/code\u003e should return 2470433131948040.');" + "assert.strictEqual(euler321(), 2470433131948040, 'message: euler321() should return 2470433131948040.');" ], "solutions": [], "translations": {}, @@ -10786,7 +10789,7 @@ "type": "bonfire", "title": "Problem 322: Binomial coefficients divisible by 10", "tests": [ - "assert.strictEqual(euler322(), 999998760323314000, 'message: \u003ccode\u003eeuler322()\u003c/code\u003e should return 999998760323314000.');" + "assert.strictEqual(euler322(), 999998760323314000, 'message: euler322() should return 999998760323314000.');" ], "solutions": [], "translations": {}, @@ -10799,7 +10802,7 @@ "euler322();" ], "description": [ - "Let T(m, n) be the number of the binomial coefficients iCn that are divisible by 10 for n ≤ i \u003c m(i, m and n are positive integers).", + "Let T(m, n) be the number of the binomial coefficients iCn that are divisible by 10 for n ≤ i < m(i, m and n are positive integers).", "You are given that T(109, 107-10) = 989697000.", "", "", @@ -10812,7 +10815,7 @@ "type": "bonfire", "title": "Problem 323: Bitwise-OR operations on random integers", "tests": [ - "assert.strictEqual(euler323(), 6.3551758451, 'message: \u003ccode\u003eeuler323()\u003c/code\u003e should return 6.3551758451.');" + "assert.strictEqual(euler323(), 6.3551758451, 'message: euler323() should return 6.3551758451.');" ], "solutions": [], "translations": {}, @@ -10826,9 +10829,9 @@ ], "description": [ "Let y0, y1, y2,... be a sequence of random unsigned 32 bit integers", - "(i.e. 0 ≤ yi \u003c 232, every value equally likely).", + "(i.e. 0 ≤ yi < 232, every value equally likely).", "For the sequence xi the following recursion is given:x0 = 0 and", - "xi = xi-1| yi-1, for i \u003e 0. ( | is the bitwise-OR operator)", + "xi = xi-1| yi-1, for i > 0. ( | is the bitwise-OR operator)", "It can be seen that eventually there will be an index N such that xi = 232 -1 (a bit-pattern of all ones) for all i ≥ N.", "", "Find the expected value of N. ", @@ -10841,7 +10844,7 @@ "type": "bonfire", "title": "Problem 324: Building a tower", "tests": [ - "assert.strictEqual(euler324(), 96972774, 'message: \u003ccode\u003eeuler324()\u003c/code\u003e should return 96972774.');" + "assert.strictEqual(euler324(), 96972774, 'message: euler324() should return 96972774.');" ], "solutions": [], "translations": {}, @@ -10866,7 +10869,7 @@ "type": "bonfire", "title": "Problem 325: Stone Game II", "tests": [ - "assert.strictEqual(euler325(), 54672965, 'message: \u003ccode\u003eeuler325()\u003c/code\u003e should return 54672965.');" + "assert.strictEqual(euler325(), 54672965, 'message: euler325() should return 54672965.');" ], "solutions": [], "translations": {}, @@ -10899,7 +10902,7 @@ "", "", "", - "Define S(N) as the sum of (xi+yi) for all losing configurations (xi,yi), 0 \u003c xi \u003c yi ≤ N. We can verify that S(10) = 211 and S(104) = 230312207313.", + "Define S(N) as the sum of (xi+yi) for all losing configurations (xi,yi), 0 < xi < yi ≤ N. We can verify that S(10) = 211 and S(104) = 230312207313.", "", "", "", @@ -10912,7 +10915,7 @@ "type": "bonfire", "title": "Problem 326: Modulo Summations", "tests": [ - "assert.strictEqual(euler326(), 1966666166408794400, 'message: \u003ccode\u003eeuler326()\u003c/code\u003e should return 1966666166408794400.');" + "assert.strictEqual(euler326(), 1966666166408794400, 'message: euler326() should return 1966666166408794400.');" ], "solutions": [], "translations": {}, @@ -10947,7 +10950,7 @@ "type": "bonfire", "title": "Problem 327: Rooms of Doom", "tests": [ - "assert.strictEqual(euler327(), 34315549139516, 'message: \u003ccode\u003eeuler327()\u003c/code\u003e should return 34315549139516.');" + "assert.strictEqual(euler327(), 34315549139516, 'message: euler327() should return 34315549139516.');" ], "solutions": [], "translations": {}, @@ -10990,7 +10993,7 @@ "type": "bonfire", "title": "Problem 328: Lowest-cost Search", "tests": [ - "assert.strictEqual(euler328(), 260511850222, 'message: \u003ccode\u003eeuler328()\u003c/code\u003e should return 260511850222.');" + "assert.strictEqual(euler328(), 260511850222, 'message: euler328() should return 260511850222.');" ], "solutions": [], "translations": {}, @@ -11018,7 +11021,7 @@ "We can improve considerably the worst-case cost for n=8, by asking \"5\" as our first question.", "If we are told that the hidden number is higher than 5, our second question will be \"7\", then we'll know for certain what the hidden number is (for a total cost of 5+7=12).", "If we are told that the hidden number is lower than 5, our second question will be \"3\" and if the hidden number is lower than 3 our third question will be \"1\", giving a total cost of 5+3+1=9.", - "Since 12\u003e9, the worst-case cost for this strategy is 12. That's better than what we achieved previously with the \"binary search\" strategy; it is also better than or equal to any other strategy.", + "Since 12>9, the worst-case cost for this strategy is 12. That's better than what we achieved previously with the \"binary search\" strategy; it is also better than or equal to any other strategy.", "So, in fact, we have just described an optimal strategy for n=8.", "", "Let C(n) be the worst-case cost achieved by an optimal strategy for n, as described above.", @@ -11034,7 +11037,7 @@ "type": "bonfire", "title": "Problem 329: Prime Frog", "tests": [ - "assert.strictEqual(euler329(), 199740353 / 29386561536000, 'message: \u003ccode\u003eeuler329()\u003c/code\u003e should return 199740353 / 29386561536000.');" + "assert.strictEqual(euler329(), 199740353 / 29386561536000, 'message: euler329() should return 199740353 / 29386561536000.');" ], "solutions": [], "translations": {}, @@ -11067,7 +11070,7 @@ "type": "bonfire", "title": "Problem 330: Euler's Number", "tests": [ - "assert.strictEqual(euler330(), 15955822, 'message: \u003ccode\u003eeuler330()\u003c/code\u003e should return 15955822.');" + "assert.strictEqual(euler330(), 15955822, 'message: euler330() should return 15955822.');" ], "solutions": [], "translations": {}, @@ -11129,7 +11132,7 @@ "type": "bonfire", "title": "Problem 331: Cross flips", "tests": [ - "assert.strictEqual(euler331(), 467178235146843500, 'message: \u003ccode\u003eeuler331()\u003c/code\u003e should return 467178235146843500.');" + "assert.strictEqual(euler331(), 467178235146843500, 'message: euler331() should return 467178235146843500.');" ], "solutions": [], "translations": {}, @@ -11168,7 +11171,7 @@ "type": "bonfire", "title": "Problem 332: Spherical triangles", "tests": [ - "assert.strictEqual(euler332(), 2717.751525, 'message: \u003ccode\u003eeuler332()\u003c/code\u003e should return 2717.751525.');" + "assert.strictEqual(euler332(), 2717.751525, 'message: euler332() should return 2717.751525.');" ], "solutions": [], "translations": {}, @@ -11203,7 +11206,7 @@ "type": "bonfire", "title": "Problem 333: Special partitions", "tests": [ - "assert.strictEqual(euler333(), 3053105, 'message: \u003ccode\u003eeuler333()\u003c/code\u003e should return 3053105.');" + "assert.strictEqual(euler333(), 3053105, 'message: euler333() should return 3053105.');" ], "solutions": [], "translations": {}, @@ -11229,9 +11232,9 @@ "", "Let's consider only the prime integers q which would have a single valid partition such as P(17).", "", - "The sum of the primes q \u003c100 such that P(q)=1 equals 233.", + "The sum of the primes q <100 such that P(q)=1 equals 233.", "", - "Find the sum of the primes q \u003c1000000 such that P(q)=1." + "Find the sum of the primes q <1000000 such that P(q)=1." ] }, { @@ -11240,7 +11243,7 @@ "type": "bonfire", "title": "Problem 334: Spilling the beans", "tests": [ - "assert.strictEqual(euler334(), 150320021261690850, 'message: \u003ccode\u003eeuler334()\u003c/code\u003e should return 150320021261690850.');" + "assert.strictEqual(euler334(), 150320021261690850, 'message: euler334() should return 150320021261690850.');" ], "solutions": [], "translations": {}, @@ -11316,7 +11319,7 @@ "type": "bonfire", "title": "Problem 335: Gathering the beans", "tests": [ - "assert.strictEqual(euler335(), 5032316, 'message: \u003ccode\u003eeuler335()\u003c/code\u003e should return 5032316.');" + "assert.strictEqual(euler335(), 5032316, 'message: euler335() should return 5032316.');" ], "solutions": [], "translations": {}, @@ -11346,7 +11349,7 @@ "type": "bonfire", "title": "Problem 336: Maximix Arrangements", "tests": [ - "assert.strictEqual(euler336(), CAGBIHEFJDK, 'message: \u003ccode\u003eeuler336()\u003c/code\u003e should return CAGBIHEFJDK.');" + "assert.strictEqual(euler336(), CAGBIHEFJDK, 'message: euler336() should return CAGBIHEFJDK.');" ], "solutions": [], "translations": {}, @@ -11381,7 +11384,7 @@ "type": "bonfire", "title": "Problem 337: Totient Stairstep Sequences", "tests": [ - "assert.strictEqual(euler337(), 85068035, 'message: \u003ccode\u003eeuler337()\u003c/code\u003e should return 85068035.');" + "assert.strictEqual(euler337(), 85068035, 'message: euler337() should return 85068035.');" ], "solutions": [], "translations": {}, @@ -11396,7 +11399,7 @@ "description": [ "Let {a1, a2,..., an} be an integer sequence of length n such that:", "a1 = 6", - "for all 1 ≤ i \u003c n : φ(ai) \u003c φ(ai+1) \u003c ai \u003c ai+11", + "for all 1 ≤ i < n : φ(ai) < φ(ai+1) < ai < ai+11", "Let S(N) be the number of such sequences with an ≤ N.", "For example, S(10) = 4: {6}, {6, 8}, {6, 8, 9} and {6, 10}.", "We can verify that S(100) = 482073668 and S(10 000) mod 108 = 73808307.", @@ -11412,7 +11415,7 @@ "type": "bonfire", "title": "Problem 338: Cutting Rectangular Grid Paper", "tests": [ - "assert.strictEqual(euler338(), 15614292, 'message: \u003ccode\u003eeuler338()\u003c/code\u003e should return 15614292.');" + "assert.strictEqual(euler338(), 15614292, 'message: euler338() should return 15614292.');" ], "solutions": [], "translations": {}, @@ -11439,7 +11442,7 @@ "Note that rectangles congruent to the initial one are not counted in F(w,h).", "Note also that rectangles with dimensions w × h and dimensions h × w are not considered distinct.", "", - "For an integer N, let G(N) be the sum of F(w,h) for all pairs w and h which satisfy 0 \u003c h ≤ w ≤ N.", + "For an integer N, let G(N) be the sum of F(w,h) for all pairs w and h which satisfy 0 < h ≤ w ≤ N.", "We can verify that G(10) = 55, G(103) = 971745 and G(105) = 9992617687.", "", "Find G(1012). Give your answer modulo 108." @@ -11451,7 +11454,7 @@ "type": "bonfire", "title": "Problem 339: Peredur fab Efrawg", "tests": [ - "assert.strictEqual(euler339(), 19823.542204, 'message: \u003ccode\u003eeuler339()\u003c/code\u003e should return 19823.542204.');" + "assert.strictEqual(euler339(), 19823.542204, 'message: euler339() should return 19823.542204.');" ], "solutions": [], "translations": {}, @@ -11482,7 +11485,7 @@ "type": "bonfire", "title": "Problem 340: Crazy Function", "tests": [ - "assert.strictEqual(euler340(), 291504964, 'message: \u003ccode\u003eeuler340()\u003c/code\u003e should return 291504964.');" + "assert.strictEqual(euler340(), 291504964, 'message: euler340() should return 291504964.');" ], "solutions": [], "translations": {}, @@ -11496,7 +11499,7 @@ ], "description": [ "For fixed integers a, b, c, define the crazy function F(n) as follows:", - "F(n) = n - c for all n \u003e b ", + "F(n) = n - c for all n > b ", "F(n) = F(a + F(a + F(a + F(a + n)))) for all n ≤ b.", "", "", @@ -11516,7 +11519,7 @@ "type": "bonfire", "title": "Problem 341: Golomb's self-describing sequence", "tests": [ - "assert.strictEqual(euler341(), 56098610614277016, 'message: \u003ccode\u003eeuler341()\u003c/code\u003e should return 56098610614277016.');" + "assert.strictEqual(euler341(), 56098610614277016, 'message: euler341() should return 56098610614277016.');" ], "solutions": [], "translations": {}, @@ -11535,9 +11538,9 @@ "n123456789101112131415…G(n)122334445556666…", "", "You are given that G(103) = 86, G(106) = 6137.", - "You are also given that ΣG(n3) = 153506976 for 1 ≤ n \u003c 103.", + "You are also given that ΣG(n3) = 153506976 for 1 ≤ n < 103.", "", - "Find ΣG(n3) for 1 ≤ n \u003c 106." + "Find ΣG(n3) for 1 ≤ n < 106." ] }, { @@ -11546,7 +11549,7 @@ "type": "bonfire", "title": "Problem 342: The totient of a square is a cube", "tests": [ - "assert.strictEqual(euler342(), 5943040885644, 'message: \u003ccode\u003eeuler342()\u003c/code\u003e should return 5943040885644.');" + "assert.strictEqual(euler342(), 5943040885644, 'message: euler342() should return 5943040885644.');" ], "solutions": [], "translations": {}, @@ -11564,7 +11567,7 @@ "So 2500 is a square and φ(2500) is a cube.", "", "", - "Find the sum of all numbers n, 1 \u0026lt n \u003c 1010 such that φ(n2) is a cube.", + "Find the sum of all numbers n, 1 < n < 1010 such that φ(n2) is a cube.", "", "", "1 φ denotes Euler's totient function." @@ -11576,7 +11579,7 @@ "type": "bonfire", "title": "Problem 343: Fractional Sequences", "tests": [ - "assert.strictEqual(euler343(), 269533451410884200, 'message: \u003ccode\u003eeuler343()\u003c/code\u003e should return 269533451410884200.');" + "assert.strictEqual(euler343(), 269533451410884200, 'message: euler343() should return 269533451410884200.');" ], "solutions": [], "translations": {}, @@ -11591,7 +11594,7 @@ "description": [ "For any positive integer k, a finite sequence ai of fractions xi/yi is defined by:", "a1 = 1/k and", - "ai = (xi-1+1)/(yi-1-1) reduced to lowest terms for i\u003e1.", + "ai = (xi-1+1)/(yi-1-1) reduced to lowest terms for i>1.", "When ai reaches some integer n, the sequence stops. (That is, when yi=1.)", "Define f(k) = n. ", "For example, for k = 20:", @@ -11619,7 +11622,7 @@ "type": "bonfire", "title": "Problem 344: Silver dollar game", "tests": [ - "assert.strictEqual(euler344(), 65579304332, 'message: \u003ccode\u003eeuler344()\u003c/code\u003e should return 65579304332.');" + "assert.strictEqual(euler344(), 65579304332, 'message: euler344() should return 65579304332.');" ], "solutions": [], "translations": {}, @@ -11661,7 +11664,7 @@ "type": "bonfire", "title": "Problem 345: Matrix Sum", "tests": [ - "assert.strictEqual(euler345(), 13938, 'message: \u003ccode\u003eeuler345()\u003c/code\u003e should return 13938.');" + "assert.strictEqual(euler345(), 13938, 'message: euler345() should return 13938.');" ], "solutions": [], "translations": {}, @@ -11708,7 +11711,7 @@ "type": "bonfire", "title": "Problem 346: Strong Repunits", "tests": [ - "assert.strictEqual(euler346(), 336108797689259260, 'message: \u003ccode\u003eeuler346()\u003c/code\u003e should return 336108797689259260.');" + "assert.strictEqual(euler346(), 336108797689259260, 'message: euler346() should return 336108797689259260.');" ], "solutions": [], "translations": {}, @@ -11721,7 +11724,7 @@ "euler346();" ], "description": [ - "The number 7 is special, because 7 is 111 written in base 2, and 11 written in base 6 (i.e. 710 = 116 = 1112). In other words, 7 is a repunit in at least two bases b \u003e 1. ", + "The number 7 is special, because 7 is 111 written in base 2, and 11 written in base 6 (i.e. 710 = 116 = 1112). In other words, 7 is a repunit in at least two bases b > 1. ", "", "", "We shall call a positive integer with this property a strong repunit. It can be verified that there are 8 strong repunits below 50: {1,7,13,15,21,31,40,43}. Furthermore, the sum of all strong repunits below 1000 equals 15864.", @@ -11735,7 +11738,7 @@ "type": "bonfire", "title": "Problem 347: Largest integer divisible by two primes", "tests": [ - "assert.strictEqual(euler347(), 11109800204052, 'message: \u003ccode\u003eeuler347()\u003c/code\u003e should return 11109800204052.');" + "assert.strictEqual(euler347(), 11109800204052, 'message: euler347() should return 11109800204052.');" ], "solutions": [], "translations": {}, @@ -11771,7 +11774,7 @@ "type": "bonfire", "title": "Problem 348: Sum of a square and a cube", "tests": [ - "assert.strictEqual(euler348(), 1004195061, 'message: \u003ccode\u003eeuler348()\u003c/code\u003e should return 1004195061.');" + "assert.strictEqual(euler348(), 1004195061, 'message: euler348() should return 1004195061.');" ], "solutions": [], "translations": {}, @@ -11802,7 +11805,7 @@ "type": "bonfire", "title": "Problem 349: Langton's ant", "tests": [ - "assert.strictEqual(euler349(), 115384615384614940, 'message: \u003ccode\u003eeuler349()\u003c/code\u003e should return 115384615384614940.');" + "assert.strictEqual(euler349(), 115384615384614940, 'message: euler349() should return 115384615384614940.');" ], "solutions": [], "translations": {}, @@ -11829,7 +11832,7 @@ "type": "bonfire", "title": "Problem 350: Constraining the least greatest and the greatest least", "tests": [ - "assert.strictEqual(euler350(), 84664213, 'message: \u003ccode\u003eeuler350()\u003c/code\u003e should return 84664213.');" + "assert.strictEqual(euler350(), 84664213, 'message: euler350() should return 84664213.');" ], "solutions": [], "translations": {}, @@ -11864,7 +11867,7 @@ "type": "bonfire", "title": "Problem 351: Hexagonal orchards", "tests": [ - "assert.strictEqual(euler351(), 11762187201804552, 'message: \u003ccode\u003eeuler351()\u003c/code\u003e should return 11762187201804552.');" + "assert.strictEqual(euler351(), 11762187201804552, 'message: euler351() should return 11762187201804552.');" ], "solutions": [], "translations": {}, @@ -11905,7 +11908,7 @@ "type": "bonfire", "title": "Problem 352: Blood tests", "tests": [ - "assert.strictEqual(euler352(), 378563.260589, 'message: \u003ccode\u003eeuler352()\u003c/code\u003e should return 378563.260589.');" + "assert.strictEqual(euler352(), 378563.260589, 'message: euler352() should return 378563.260589.');" ], "solutions": [], "translations": {}, @@ -11964,7 +11967,7 @@ "type": "bonfire", "title": "Problem 353: Risky moon", "tests": [ - "assert.strictEqual(euler353(), 1.2759860331, 'message: \u003ccode\u003eeuler353()\u003c/code\u003e should return 1.2759860331.');" + "assert.strictEqual(euler353(), 1.2759860331, 'message: euler353() should return 1.2759860331.');" ], "solutions": [], "translations": {}, @@ -12014,7 +12017,7 @@ "type": "bonfire", "title": "Problem 354: Distances in a bee's honeycomb", "tests": [ - "assert.strictEqual(euler354(), 58065134, 'message: \u003ccode\u003eeuler354()\u003c/code\u003e should return 58065134.');" + "assert.strictEqual(euler354(), 58065134, 'message: euler354() should return 58065134.');" ], "solutions": [], "translations": {}, @@ -12047,7 +12050,7 @@ "type": "bonfire", "title": "Problem 355: Maximal coprime subset", "tests": [ - "assert.strictEqual(euler355(), 1726545007, 'message: \u003ccode\u003eeuler355()\u003c/code\u003e should return 1726545007.');" + "assert.strictEqual(euler355(), 1726545007, 'message: euler355() should return 1726545007.');" ], "solutions": [], "translations": {}, @@ -12076,7 +12079,7 @@ "type": "bonfire", "title": "Problem 356: Largest roots of cubic polynomials", "tests": [ - "assert.strictEqual(euler356(), 28010159, 'message: \u003ccode\u003eeuler356()\u003c/code\u003e should return 28010159.');" + "assert.strictEqual(euler356(), 28010159, 'message: euler356() should return 28010159.');" ], "solutions": [], "translations": {}, @@ -12105,7 +12108,7 @@ "type": "bonfire", "title": "Problem 357: Prime generating integers", "tests": [ - "assert.strictEqual(euler357(), 1739023853137, 'message: \u003ccode\u003eeuler357()\u003c/code\u003e should return 1739023853137.');" + "assert.strictEqual(euler357(), 1739023853137, 'message: euler357() should return 1739023853137.');" ], "solutions": [], "translations": {}, @@ -12132,7 +12135,7 @@ "type": "bonfire", "title": "Problem 358: Cyclic numbers", "tests": [ - "assert.strictEqual(euler358(), 3284144505, 'message: \u003ccode\u003eeuler358()\u003c/code\u003e should return 3284144505.');" + "assert.strictEqual(euler358(), 3284144505, 'message: euler358() should return 3284144505.');" ], "solutions": [], "translations": {}, @@ -12182,7 +12185,7 @@ "type": "bonfire", "title": "Problem 359: Hilbert's New Hotel", "tests": [ - "assert.strictEqual(euler359(), 40632119, 'message: \u003ccode\u003eeuler359()\u003c/code\u003e should return 40632119.');" + "assert.strictEqual(euler359(), 40632119, 'message: euler359() should return 40632119.');" ], "solutions": [], "translations": {}, @@ -12233,7 +12236,7 @@ "type": "bonfire", "title": "Problem 360: Scary Sphere", "tests": [ - "assert.strictEqual(euler360(), 878825614395267100, 'message: \u003ccode\u003eeuler360()\u003c/code\u003e should return 878825614395267100.');" + "assert.strictEqual(euler360(), 878825614395267100, 'message: euler360() should return 878825614395267100.');" ], "solutions": [], "translations": {}, @@ -12266,7 +12269,7 @@ "type": "bonfire", "title": "Problem 361: Subsequence of Thue-Morse sequence", "tests": [ - "assert.strictEqual(euler361(), 178476944, 'message: \u003ccode\u003eeuler361()\u003c/code\u003e should return 178476944.');" + "assert.strictEqual(euler361(), 178476944, 'message: euler361() should return 178476944.');" ], "solutions": [], "translations": {}, @@ -12313,7 +12316,7 @@ "type": "bonfire", "title": "Problem 362: Squarefree factors", "tests": [ - "assert.strictEqual(euler362(), 457895958010, 'message: \u003ccode\u003eeuler362()\u003c/code\u003e should return 457895958010.');" + "assert.strictEqual(euler362(), 457895958010, 'message: euler362() should return 457895958010.');" ], "solutions": [], "translations": {}, @@ -12351,7 +12354,7 @@ "type": "bonfire", "title": "Problem 363: Bézier Curves", "tests": [ - "assert.strictEqual(euler363(), 0.0000372091, 'message: \u003ccode\u003eeuler363()\u003c/code\u003e should return 0.0000372091.');" + "assert.strictEqual(euler363(), 0.0000372091, 'message: euler363() should return 0.0000372091.');" ], "solutions": [], "translations": {}, @@ -12382,7 +12385,7 @@ "From the construction it is clear that the Bézier curve will be tangent to the segments P0P1 in P0 and P2P3 in P3.", "", "A cubic Bézier curve with P0=(1,0), P1=(1,v), P2=(v,1) and P3=(0,1) is used to approximate a quarter circle.", - "The value v \u003e 0 is chosen such that the area enclosed by the lines OP0, OP3 and the curve is equal to π/4 (the area of the quarter circle).", + "The value v > 0 is chosen such that the area enclosed by the lines OP0, OP3 and the curve is equal to π/4 (the area of the quarter circle).", "", "By how many percent does the length of the curve differ from the length of the quarter circle?", "That is, if L is the length of the curve, calculate 100 × L − π/2π/2Give your answer rounded to 10 digits behind the decimal point." @@ -12394,7 +12397,7 @@ "type": "bonfire", "title": "Problem 364: Comfortable distance", "tests": [ - "assert.strictEqual(euler364(), 44855254, 'message: \u003ccode\u003eeuler364()\u003c/code\u003e should return 44855254.');" + "assert.strictEqual(euler364(), 44855254, 'message: euler364() should return 44855254.');" ], "solutions": [], "translations": {}, @@ -12428,7 +12431,7 @@ "type": "bonfire", "title": "Problem 365: A huge binomial coefficient", "tests": [ - "assert.strictEqual(euler365(), 162619462356610300, 'message: \u003ccode\u003eeuler365()\u003c/code\u003e should return 162619462356610300.');" + "assert.strictEqual(euler365(), 162619462356610300, 'message: euler365() should return 162619462356610300.');" ], "solutions": [], "translations": {}, @@ -12447,7 +12450,7 @@ "Let M(n,k,m) denote the binomial coefficient C(n,k) modulo m.", "", "", - "Calculate ∑M(1018,109,p*q*r) for 1000\u003cp\u003cq\u003cr\u003c5000 and p,q,r prime." + "Calculate ∑M(1018,109,p*q*r) for 1000euler366() should return 88351299.');" ], "solutions": [], "translations": {}, @@ -12501,7 +12504,7 @@ "type": "bonfire", "title": "Problem 367: Bozo sort", "tests": [ - "assert.strictEqual(euler367(), 48271207, 'message: \u003ccode\u003eeuler367()\u003c/code\u003e should return 48271207.');" + "assert.strictEqual(euler367(), 48271207, 'message: euler367() should return 48271207.');" ], "solutions": [], "translations": {}, @@ -12539,7 +12542,7 @@ "type": "bonfire", "title": "Problem 368: A Kempner-like series", "tests": [ - "assert.strictEqual(euler368(), 253.6135092068, 'message: \u003ccode\u003eeuler368()\u003c/code\u003e should return 253.6135092068.');" + "assert.strictEqual(euler368(), 253.6135092068, 'message: euler368() should return 253.6135092068.');" ], "solutions": [], "translations": {}, @@ -12574,7 +12577,7 @@ "type": "bonfire", "title": "Problem 369: Badugi", "tests": [ - "assert.strictEqual(euler369(), 862400558448, 'message: \u003ccode\u003eeuler369()\u003c/code\u003e should return 862400558448.');" + "assert.strictEqual(euler369(), 862400558448, 'message: euler369() should return 862400558448.');" ], "solutions": [], "translations": {}, @@ -12600,7 +12603,7 @@ "type": "bonfire", "title": "Problem 370: Geometric triangles", "tests": [ - "assert.strictEqual(euler370(), 41791929448408, 'message: \u003ccode\u003eeuler370()\u003c/code\u003e should return 41791929448408.');" + "assert.strictEqual(euler370(), 41791929448408, 'message: euler370() should return 41791929448408.');" ], "solutions": [], "translations": {}, @@ -12628,7 +12631,7 @@ "type": "bonfire", "title": "Problem 371: Licence plates", "tests": [ - "assert.strictEqual(euler371(), 40.66368097, 'message: \u003ccode\u003eeuler371()\u003c/code\u003e should return 40.66368097.');" + "assert.strictEqual(euler371(), 40.66368097, 'message: euler371() should return 40.66368097.');" ], "solutions": [], "translations": {}, @@ -12662,7 +12665,7 @@ "type": "bonfire", "title": "Problem 372: Pencils of rays", "tests": [ - "assert.strictEqual(euler372(), 301450082318807040, 'message: \u003ccode\u003eeuler372()\u003c/code\u003e should return 301450082318807040.');" + "assert.strictEqual(euler372(), 301450082318807040, 'message: euler372() should return 301450082318807040.');" ], "solutions": [], "translations": {}, @@ -12675,7 +12678,7 @@ "euler372();" ], "description": [ - "Let R(M, N) be the number of lattice points (x, y) which satisfy M\u003cx≤N, M\u003cy≤N and is odd.", + "Let R(M, N) be the number of lattice points (x, y) which satisfy Meuler373() should return 727227472448913.');" ], "solutions": [], "translations": {}, @@ -12721,7 +12724,7 @@ "type": "bonfire", "title": "Problem 374: Maximum Integer Partition Product", "tests": [ - "assert.strictEqual(euler374(), 334420941, 'message: \u003ccode\u003eeuler374()\u003c/code\u003e should return 334420941.');" + "assert.strictEqual(euler374(), 334420941, 'message: euler374() should return 334420941.');" ], "solutions": [], "translations": {}, @@ -12762,7 +12765,7 @@ "type": "bonfire", "title": "Problem 375: Minimum of subsequences", "tests": [ - "assert.strictEqual(euler375(), 7435327983715286000, 'message: \u003ccode\u003eeuler375()\u003c/code\u003e should return 7435327983715286000.');" + "assert.strictEqual(euler375(), 7435327983715286000, 'message: euler375() should return 7435327983715286000.');" ], "solutions": [], "translations": {}, @@ -12799,7 +12802,7 @@ "type": "bonfire", "title": "Problem 376: Nontransitive sets of dice", "tests": [ - "assert.strictEqual(euler376(), 973059630185670, 'message: \u003ccode\u003eeuler376()\u003c/code\u003e should return 973059630185670.');" + "assert.strictEqual(euler376(), 973059630185670, 'message: euler376() should return 973059630185670.');" ], "solutions": [], "translations": {}, @@ -12826,15 +12829,15 @@ "", "", "If the first player picks die A and the second player picks die B we get", - "P(second player wins) = 7/12 \u003e 1/2", + "P(second player wins) = 7/12 > 1/2", "", "", "If the first player picks die B and the second player picks die C we get", - "P(second player wins) = 7/12 \u003e 1/2", + "P(second player wins) = 7/12 > 1/2", "", "", "If the first player picks die C and the second player picks die A we get", - "P(second player wins) = 25/36 \u003e 1/2", + "P(second player wins) = 25/36 > 1/2", "", "", "So whatever die the first player picks, the second player can pick another die and have a larger than 50% chance of winning.", @@ -12857,7 +12860,7 @@ "type": "bonfire", "title": "Problem 377: Sum of digits, experience 13", "tests": [ - "assert.strictEqual(euler377(), 732385277, 'message: \u003ccode\u003eeuler377()\u003c/code\u003e should return 732385277.');" + "assert.strictEqual(euler377(), 732385277, 'message: euler377() should return 732385277.');" ], "solutions": [], "translations": {}, @@ -12888,7 +12891,7 @@ "type": "bonfire", "title": "Problem 378: Triangle Triples", "tests": [ - "assert.strictEqual(euler378(), 147534623725724700, 'message: \u003ccode\u003eeuler378()\u003c/code\u003e should return 147534623725724700.');" + "assert.strictEqual(euler378(), 147534623725724700, 'message: euler378() should return 147534623725724700.');" ], "solutions": [], "translations": {}, @@ -12914,7 +12917,7 @@ "T(7) = 28 and dT(7) = 6.", "", "", - "Let Tr(n) be the number of triples (i, j, k) such that 1 ≤ i \u003c j \u003c k ≤ n and dT(i) \u003e dT(j) \u003e dT(k).", + "Let Tr(n) be the number of triples (i, j, k) such that 1 ≤ i < j < k ≤ n and dT(i) > dT(j) > dT(k).", "Tr(20) = 14, Tr(100) = 5772 and Tr(1000) = 11174776.", "", "", @@ -12928,7 +12931,7 @@ "type": "bonfire", "title": "Problem 379: Least common multiple count", "tests": [ - "assert.strictEqual(euler379(), 132314136838185, 'message: \u003ccode\u003eeuler379()\u003c/code\u003e should return 132314136838185.');" + "assert.strictEqual(euler379(), 132314136838185, 'message: euler379() should return 132314136838185.');" ], "solutions": [], "translations": {}, @@ -12960,7 +12963,7 @@ "type": "bonfire", "title": "Problem 380: Amazing Mazes!", "tests": [ - "assert.strictEqual(euler380(), Infinity, 'message: \u003ccode\u003eeuler380()\u003c/code\u003e should return Infinity.');" + "assert.strictEqual(euler380(), Infinity, 'message: euler380() should return Infinity.');" ], "solutions": [], "translations": {}, @@ -12995,7 +12998,7 @@ "type": "bonfire", "title": "Problem 381: (prime-k) factorial", "tests": [ - "assert.strictEqual(euler381(), 139602943319822, 'message: \u003ccode\u003eeuler381()\u003c/code\u003e should return 139602943319822.');" + "assert.strictEqual(euler381(), 139602943319822, 'message: euler381() should return 139602943319822.');" ], "solutions": [], "translations": {}, @@ -13016,10 +13019,10 @@ "As 872 mod(7) = 4, S(7) = 4.", "", "", - "It can be verified that ∑S(p) = 480 for 5 ≤ p \u003c 100.", + "It can be verified that ∑S(p) = 480 for 5 ≤ p < 100.", "", "", - "Find ∑S(p) for 5 ≤ p \u003c 108." + "Find ∑S(p) for 5 ≤ p < 108." ] }, { @@ -13028,7 +13031,7 @@ "type": "bonfire", "title": "Problem 382: Generating polygons", "tests": [ - "assert.strictEqual(euler382(), 697003956, 'message: \u003ccode\u003eeuler382()\u003c/code\u003e should return 697003956.');" + "assert.strictEqual(euler382(), 697003956, 'message: euler382() should return 697003956.');" ], "solutions": [], "translations": {}, @@ -13056,7 +13059,7 @@ "", "", "Consider the sequence s, defined as follows:s1 = 1, s2 = 2, s3 = 3", - "sn = sn-1 + sn-3 for n \u003e 3.", + "sn = sn-1 + sn-3 for n > 3.", "", "Let Un be the set {s1, s2, ..., sn}. For example, U10 = {1, 2, 3, 4, 6, 9, 13, 19, 28, 41}.", "Let f(n) be the number of subsets of Un which generate at least one polygon.", @@ -13073,7 +13076,7 @@ "type": "bonfire", "title": "Problem 383: Divisibility comparison between factorials", "tests": [ - "assert.strictEqual(euler383(), 22173624649806, 'message: \u003ccode\u003eeuler383()\u003c/code\u003e should return 22173624649806.');" + "assert.strictEqual(euler383(), 22173624649806, 'message: euler383() should return 22173624649806.');" ], "solutions": [], "translations": {}, @@ -13091,7 +13094,7 @@ "", "", "", - "Let T5(n) be the number of integers i which satisfy f5((2·i-1)!) \u003c 2·f5(i!) and 1 ≤ i ≤ n.", + "Let T5(n) be the number of integers i which satisfy f5((2·i-1)!) < 2·f5(i!) and 1 ≤ i ≤ n.", "It can be verified that T5(103) = 68 and T5(109) = 2408210.", "", "", @@ -13105,7 +13108,7 @@ "type": "bonfire", "title": "Problem 384: Rudin-Shapiro sequence", "tests": [ - "assert.strictEqual(euler384(), 3354706415856333000, 'message: \u003ccode\u003eeuler384()\u003c/code\u003e should return 3354706415856333000.');" + "assert.strictEqual(euler384(), 3354706415856333000, 'message: euler384() should return 3354706415856333000.');" ], "solutions": [], "translations": {}, @@ -13138,7 +13141,7 @@ "", "Let F(n) be the fibonacci sequence defined by:", "F(0)=F(1)=1 and", - "F(n)=F(n-1)+F(n-2) for n\u003e1.", + "F(n)=F(n-1)+F(n-2) for n>1.", "", "Define GF(t)=g(F(t),F(t-1)).", "", @@ -13151,7 +13154,7 @@ "type": "bonfire", "title": "Problem 385: Ellipses inside triangles", "tests": [ - "assert.strictEqual(euler385(), 3776957309612154000, 'message: \u003ccode\u003eeuler385()\u003c/code\u003e should return 3776957309612154000.');" + "assert.strictEqual(euler385(), 3776957309612154000, 'message: euler385() should return 3776957309612154000.');" ], "solutions": [], "translations": {}, @@ -13193,7 +13196,7 @@ "type": "bonfire", "title": "Problem 386: Maximum length of an antichain", "tests": [ - "assert.strictEqual(euler386(), 528755790, 'message: \u003ccode\u003eeuler386()\u003c/code\u003e should return 528755790.');" + "assert.strictEqual(euler386(), 528755790, 'message: euler386() should return 528755790.');" ], "solutions": [], "translations": {}, @@ -13225,7 +13228,7 @@ "type": "bonfire", "title": "Problem 387: Harshad Numbers", "tests": [ - "assert.strictEqual(euler387(), 696067597313468, 'message: \u003ccode\u003eeuler387()\u003c/code\u003e should return 696067597313468.');" + "assert.strictEqual(euler387(), 696067597313468, 'message: euler387() should return 696067597313468.');" ], "solutions": [], "translations": {}, @@ -13263,7 +13266,7 @@ "type": "bonfire", "title": "Problem 388: Distinct Lines", "tests": [ - "assert.strictEqual(euler388(), 831907372805130000, 'message: \u003ccode\u003eeuler388()\u003c/code\u003e should return 831907372805130000.');" + "assert.strictEqual(euler388(), 831907372805130000, 'message: euler388() should return 831907372805130000.');" ], "solutions": [], "translations": {}, @@ -13294,7 +13297,7 @@ "type": "bonfire", "title": "Problem 389: Platonic Dice", "tests": [ - "assert.strictEqual(euler389(), 2406376.3623, 'message: \u003ccode\u003eeuler389()\u003c/code\u003e should return 2406376.3623.');" + "assert.strictEqual(euler389(), 2406376.3623, 'message: euler389() should return 2406376.3623.');" ], "solutions": [], "translations": {}, @@ -13317,7 +13320,7 @@ "type": "bonfire", "title": "Problem 390: Triangles with non rational sides and integral area", "tests": [ - "assert.strictEqual(euler390(), 2919133642971, 'message: \u003ccode\u003eeuler390()\u003c/code\u003e should return 2919133642971.');" + "assert.strictEqual(euler390(), 2919133642971, 'message: euler390() should return 2919133642971.');" ], "solutions": [], "translations": {}, @@ -13348,7 +13351,7 @@ "type": "bonfire", "title": "Problem 391: Hopping Game", "tests": [ - "assert.strictEqual(euler391(), 61029882288, 'message: \u003ccode\u003eeuler391()\u003c/code\u003e should return 61029882288.');" + "assert.strictEqual(euler391(), 61029882288, 'message: euler391() should return 61029882288.');" ], "solutions": [], "translations": {}, @@ -13397,7 +13400,7 @@ "type": "bonfire", "title": "Problem 392: Enmeshed unit circle", "tests": [ - "assert.strictEqual(euler392(), 3.1486734435, 'message: \u003ccode\u003eeuler392()\u003c/code\u003e should return 3.1486734435.');" + "assert.strictEqual(euler392(), 3.1486734435, 'message: euler392() should return 3.1486734435.');" ], "solutions": [], "translations": {}, @@ -13435,7 +13438,7 @@ "type": "bonfire", "title": "Problem 393: Migrating ants", "tests": [ - "assert.strictEqual(euler393(), 112398351350823100, 'message: \u003ccode\u003eeuler393()\u003c/code\u003e should return 112398351350823100.');" + "assert.strictEqual(euler393(), 112398351350823100, 'message: euler393() should return 112398351350823100.');" ], "solutions": [], "translations": {}, @@ -13463,7 +13466,7 @@ "type": "bonfire", "title": "Problem 394: Eating pie", "tests": [ - "assert.strictEqual(euler394(), 3.2370342194, 'message: \u003ccode\u003eeuler394()\u003c/code\u003e should return 3.2370342194.');" + "assert.strictEqual(euler394(), 3.2370342194, 'message: euler394() should return 3.2370342194.');" ], "solutions": [], "translations": {}, @@ -13501,7 +13504,7 @@ "type": "bonfire", "title": "Problem 395: Pythagorean tree", "tests": [ - "assert.strictEqual(euler395(), 28.2453753155, 'message: \u003ccode\u003eeuler395()\u003c/code\u003e should return 28.2453753155.');" + "assert.strictEqual(euler395(), 28.2453753155, 'message: euler395() should return 28.2453753155.');" ], "solutions": [], "translations": {}, @@ -13541,7 +13544,7 @@ "type": "bonfire", "title": "Problem 396: Weak Goodstein sequence", "tests": [ - "assert.strictEqual(euler396(), 173214653, 'message: \u003ccode\u003eeuler396()\u003c/code\u003e should return 173214653.');" + "assert.strictEqual(euler396(), 173214653, 'message: euler396() should return 173214653.');" ], "solutions": [], "translations": {}, @@ -13556,7 +13559,7 @@ "description": [ "For any positive integer n, the nth weak Goodstein sequence {g1, g2, g3, ...} is defined as:", " g1 = n", - " for k \u003e 1, gk is obtained by writing gk-1 in base k, interpreting it as a base k + 1 number, and subtracting 1.", + " for k > 1, gk is obtained by writing gk-1 in base k, interpreting it as a base k + 1 number, and subtracting 1.", "", "The sequence terminates when gk becomes 0.", "", @@ -13575,10 +13578,10 @@ "", "Let G(n) be the number of nonzero elements in the nth weak Goodstein sequence.", "It can be verified that G(2) = 3, G(4) = 21 and G(6) = 381.", - "It can also be verified that ΣG(n) = 2517 for 1 ≤ n \u003c 8.", + "It can also be verified that ΣG(n) = 2517 for 1 ≤ n < 8.", "", "", - "Find the last 9 digits of ΣG(n) for 1 ≤ n \u003c 16." + "Find the last 9 digits of ΣG(n) for 1 ≤ n < 16." ] }, { @@ -13587,7 +13590,7 @@ "type": "bonfire", "title": "Problem 397: Triangle on parabola", "tests": [ - "assert.strictEqual(euler397(), 141630459461893730, 'message: \u003ccode\u003eeuler397()\u003c/code\u003e should return 141630459461893730.');" + "assert.strictEqual(euler397(), 141630459461893730, 'message: euler397() should return 141630459461893730.');" ], "solutions": [], "translations": {}, @@ -13603,7 +13606,7 @@ "On the parabola y = x2/k, three points A(a, a2/k), B(b, b2/k) and C(c, c2/k) are chosen.", "", "", - "Let F(K, X) be the number of the integer quadruplets (k, a, b, c) such that at least one angle of the triangle ABC is 45-degree, with 1 ≤ k ≤ K and -X ≤ a \u003c b \u003c c ≤ X.", + "Let F(K, X) be the number of the integer quadruplets (k, a, b, c) such that at least one angle of the triangle ABC is 45-degree, with 1 ≤ k ≤ K and -X ≤ a < b < c ≤ X.", "", "", "For example, F(1, 10) = 41 and F(10, 100) = 12492.", @@ -13616,7 +13619,7 @@ "type": "bonfire", "title": "Problem 398: Cutting rope", "tests": [ - "assert.strictEqual(euler398(), 2010.59096, 'message: \u003ccode\u003eeuler398()\u003c/code\u003e should return 2010.59096.');" + "assert.strictEqual(euler398(), 2010.59096, 'message: euler398() should return 2010.59096.');" ], "solutions": [], "translations": {}, @@ -13647,7 +13650,7 @@ "type": "bonfire", "title": "Problem 399: Squarefree Fibonacci Numbers", "tests": [ - "assert.strictEqual(euler399(), 1508395636674243, 6.5e27330467, 'message: \u003ccode\u003eeuler399()\u003c/code\u003e should return 1508395636674243, 6.5e27330467.');" + "assert.strictEqual(euler399(), 1508395636674243, 6.5e27330467, 'message: euler399() should return 1508395636674243, 6.5e27330467.');" ], "solutions": [], "translations": {}, @@ -13690,7 +13693,7 @@ "type": "bonfire", "title": "Problem 400: Fibonacci tree game", "tests": [ - "assert.strictEqual(euler400(), 438505383468410600, 'message: \u003ccode\u003eeuler400()\u003c/code\u003e should return 438505383468410600.');" + "assert.strictEqual(euler400(), 438505383468410600, 'message: euler400() should return 438505383468410600.');" ], "solutions": [], "translations": {}, @@ -13733,7 +13736,7 @@ "type": "bonfire", "title": "Problem 401: Sum of squares of divisors", "tests": [ - "assert.strictEqual(euler401(), 281632621, 'message: \u003ccode\u003eeuler401()\u003c/code\u003e should return 281632621.');" + "assert.strictEqual(euler401(), 281632621, 'message: euler401() should return 281632621.');" ], "solutions": [], "translations": {}, @@ -13766,7 +13769,7 @@ "type": "bonfire", "title": "Problem 402: Integer-valued polynomials", "tests": [ - "assert.strictEqual(euler402(), 356019862, 'message: \u003ccode\u003eeuler402()\u003c/code\u003e should return 356019862.');" + "assert.strictEqual(euler402(), 356019862, 'message: euler402() should return 356019862.');" ], "solutions": [], "translations": {}, @@ -13785,7 +13788,7 @@ "Define M(a, b, c) as the maximum m such that n4 + an3 + bn2 + cn is a multiple of m for all integers n. For example, M(4, 2, 5) = 6.", "", "", - "Also, define S(N) as the sum of M(a, b, c) for all 0 \u003c a, b, c ≤ N.", + "Also, define S(N) as the sum of M(a, b, c) for all 0 < a, b, c ≤ N.", "", "", "We can verify that S(10) = 1972 and S(10000) = 2024258331114.", @@ -13805,7 +13808,7 @@ "type": "bonfire", "title": "Problem 403: Lattice points enclosed by parabola and line", "tests": [ - "assert.strictEqual(euler403(), 18224771, 'message: \u003ccode\u003eeuler403()\u003c/code\u003e should return 18224771.');" + "assert.strictEqual(euler403(), 18224771, 'message: euler403() should return 18224771.');" ], "solutions": [], "translations": {}, @@ -13838,7 +13841,7 @@ "type": "bonfire", "title": "Problem 404: Crisscross Ellipses", "tests": [ - "assert.strictEqual(euler404(), 1199215615081353, 'message: \u003ccode\u003eeuler404()\u003c/code\u003e should return 1199215615081353.');" + "assert.strictEqual(euler404(), 1199215615081353, 'message: euler404() should return 1199215615081353.');" ], "solutions": [], "translations": {}, @@ -13852,7 +13855,7 @@ ], "description": [ "Ea is an ellipse with an equation of the form x2 + 4y2 = 4a2.", - "Ea' is the rotated image of Ea by θ degrees counterclockwise around the origin O(0, 0) for 0° \u003c θ \u003c 90°.", + "Ea' is the rotated image of Ea by θ degrees counterclockwise around the origin O(0, 0) for 0° < θ < 90°.", "", "", "", @@ -13879,7 +13882,7 @@ "type": "bonfire", "title": "Problem 405: A rectangular tiling", "tests": [ - "assert.strictEqual(euler405(), 237696125, 'message: \u003ccode\u003eeuler405()\u003c/code\u003e should return 237696125.');" + "assert.strictEqual(euler405(), 237696125, 'message: euler405() should return 237696125.');" ], "solutions": [], "translations": {}, @@ -13894,7 +13897,7 @@ "description": [ "We wish to tile a rectangle whose length is twice its width.", "Let T(0) be the tiling consisting of a single rectangle.", - "For n \u003e 0, let T(n) be obtained from T(n-1) by replacing all tiles in the following manner:", + "For n > 0, let T(n) be obtained from T(n-1) by replacing all tiles in the following manner:", "", "", "", @@ -13922,7 +13925,7 @@ "type": "bonfire", "title": "Problem 406: Guessing Game", "tests": [ - "assert.strictEqual(euler406(), 36813.12757207, 'message: \u003ccode\u003eeuler406()\u003c/code\u003e should return 36813.12757207.');" + "assert.strictEqual(euler406(), 36813.12757207, 'message: euler406() should return 36813.12757207.');" ], "solutions": [], "translations": {}, @@ -13967,7 +13970,7 @@ "type": "bonfire", "title": "Problem 407: Idempotents", "tests": [ - "assert.strictEqual(euler407(), 39782849136421, 'message: \u003ccode\u003eeuler407()\u003c/code\u003e should return 39782849136421.');" + "assert.strictEqual(euler407(), 39782849136421, 'message: euler407() should return 39782849136421.');" ], "solutions": [], "translations": {}, @@ -13984,7 +13987,7 @@ "", "", "The largest value of a such that a2 ≡ a mod 6 is 4.", - "Let's call M(n) the largest value of a \u003c n such that a2 ≡ a (mod n).", + "Let's call M(n) the largest value of a < n such that a2 ≡ a (mod n).", "So M(6) = 4.", "", "", @@ -13997,7 +14000,7 @@ "type": "bonfire", "title": "Problem 408: Admissible paths through a grid", "tests": [ - "assert.strictEqual(euler408(), 299742733, 'message: \u003ccode\u003eeuler408()\u003c/code\u003e should return 299742733.');" + "assert.strictEqual(euler408(), 299742733, 'message: euler408() should return 299742733.');" ], "solutions": [], "translations": {}, @@ -14028,7 +14031,7 @@ "type": "bonfire", "title": "Problem 409: Nim Extreme", "tests": [ - "assert.strictEqual(euler409(), 253223948, 'message: \u003ccode\u003eeuler409()\u003c/code\u003e should return 253223948.');" + "assert.strictEqual(euler409(), 253223948, 'message: euler409() should return 253223948.');" ], "solutions": [], "translations": {}, @@ -14056,7 +14059,7 @@ "type": "bonfire", "title": "Problem 410: Circle and tangent line", "tests": [ - "assert.strictEqual(euler410(), 799999783589946600, 'message: \u003ccode\u003eeuler410()\u003c/code\u003e should return 799999783589946600.');" + "assert.strictEqual(euler410(), 799999783589946600, 'message: euler410() should return 799999783589946600.');" ], "solutions": [], "translations": {}, @@ -14073,7 +14076,7 @@ "", "For example, the quadruplet (r, a, b, c) = (2, 6, 2, -7) satisfies this property.", "", - "Let F(R, X) be the number of the integer quadruplets (r, a, b, c) with this property, and with 0 \u003c r ≤ R and 0 \u003c a ≤ X.", + "Let F(R, X) be the number of the integer quadruplets (r, a, b, c) with this property, and with 0 < r ≤ R and 0 < a ≤ X.", "", "We can verify that F(1, 5) = 10, F(2, 10) = 52 and F(10, 100) = 3384.", "Find F(108, 109) + F(109, 108)." @@ -14085,7 +14088,7 @@ "type": "bonfire", "title": "Problem 411: Uphill paths", "tests": [ - "assert.strictEqual(euler411(), 9936352, 'message: \u003ccode\u003eeuler411()\u003c/code\u003e should return 9936352.');" + "assert.strictEqual(euler411(), 9936352, 'message: euler411() should return 9936352.');" ], "solutions": [], "translations": {}, @@ -14119,7 +14122,7 @@ "type": "bonfire", "title": "Problem 412: Gnomon numbering", "tests": [ - "assert.strictEqual(euler412(), 38788800, 'message: \u003ccode\u003eeuler412()\u003c/code\u003e should return 38788800.');" + "assert.strictEqual(euler412(), 38788800, 'message: euler412() should return 38788800.');" ], "solutions": [], "translations": {}, @@ -14132,7 +14135,7 @@ "euler412();" ], "description": [ - "For integers m, n (0 ≤ n \u003c m), let L(m, n) be an m×m grid with the top-right n×n grid removed.", + "For integers m, n (0 ≤ n < m), let L(m, n) be an m×m grid with the top-right n×n grid removed.", "", "For example, L(5, 3) looks like this:", "", @@ -14155,7 +14158,7 @@ "type": "bonfire", "title": "Problem 413: One-child Numbers", "tests": [ - "assert.strictEqual(euler413(), 3079418648040719, 'message: \u003ccode\u003eeuler413()\u003c/code\u003e should return 3079418648040719.');" + "assert.strictEqual(euler413(), 3079418648040719, 'message: euler413() should return 3079418648040719.');" ], "solutions": [], "translations": {}, @@ -14186,7 +14189,7 @@ "type": "bonfire", "title": "Problem 414: Kaprekar constant", "tests": [ - "assert.strictEqual(euler414(), 552506775824935500, 'message: \u003ccode\u003eeuler414()\u003c/code\u003e should return 552506775824935500.');" + "assert.strictEqual(euler414(), 552506775824935500, 'message: euler414() should return 552506775824935500.');" ], "solutions": [], "translations": {}, @@ -14221,10 +14224,10 @@ " 0 if i = Cb or if i written in base b consists of 5 identical digits", " the number of iterations it takes the Kaprekar routine in base b to arrive at Cb, otherwise", "", - "Note that we can define sb(i) for all integers i \u003c b5. If i written in base b takes less than 5 digits, the number is padded with leading zero digits until we have 5 digits before applying the Kaprekar routine.", + "Note that we can define sb(i) for all integers i < b5. If i written in base b takes less than 5 digits, the number is padded with leading zero digits until we have 5 digits before applying the Kaprekar routine.", "", "", - "Define S(b) as the sum of sb(i) for 0 \u003c i \u003c b5.", + "Define S(b) as the sum of sb(i) for 0 < i < b5.", "E.g. S(15) = 5274369 ", "S(111) = 400668930299", "", @@ -14239,7 +14242,7 @@ "type": "bonfire", "title": "Problem 415: Titanic sets", "tests": [ - "assert.strictEqual(euler415(), 55859742, 'message: \u003ccode\u003eeuler415()\u003c/code\u003e should return 55859742.');" + "assert.strictEqual(euler415(), 55859742, 'message: euler415() should return 55859742.');" ], "solutions": [], "translations": {}, @@ -14270,7 +14273,7 @@ "type": "bonfire", "title": "Problem 416: A frog's trip", "tests": [ - "assert.strictEqual(euler416(), 898082747, 'message: \u003ccode\u003eeuler416()\u003c/code\u003e should return 898082747.');" + "assert.strictEqual(euler416(), 898082747, 'message: euler416() should return 898082747.');" ], "solutions": [], "translations": {}, @@ -14297,7 +14300,7 @@ "type": "bonfire", "title": "Problem 417: Reciprocal cycles II", "tests": [ - "assert.strictEqual(euler417(), 446572970925740, 'message: \u003ccode\u003eeuler417()\u003c/code\u003e should return 446572970925740.');" + "assert.strictEqual(euler417(), 446572970925740, 'message: euler417() should return 446572970925740.');" ], "solutions": [], "translations": {}, @@ -14341,7 +14344,7 @@ "type": "bonfire", "title": "Problem 418: Factorisation triples", "tests": [ - "assert.strictEqual(euler418(), 1177163565297340400, 'message: \u003ccode\u003eeuler418()\u003c/code\u003e should return 1177163565297340400.');" + "assert.strictEqual(euler418(), 1177163565297340400, 'message: euler418() should return 1177163565297340400.');" ], "solutions": [], "translations": {}, @@ -14372,7 +14375,7 @@ "type": "bonfire", "title": "Problem 419: Look and say sequence", "tests": [ - "assert.strictEqual(euler419(), 998567458, 1046245404, 43363922, 'message: \u003ccode\u003eeuler419()\u003c/code\u003e should return 998567458, 1046245404, 43363922.');" + "assert.strictEqual(euler419(), 998567458, 1046245404, 43363922, 'message: euler419() should return 998567458, 1046245404, 43363922.');" ], "solutions": [], "translations": {}, @@ -14411,7 +14414,7 @@ "type": "bonfire", "title": "Problem 420: 2x2 positive integer matrix", "tests": [ - "assert.strictEqual(euler420(), 145159332, 'message: \u003ccode\u003eeuler420()\u003c/code\u003e should return 145159332.');" + "assert.strictEqual(euler420(), 145159332, 'message: euler420() should return 145159332.');" ], "solutions": [], "translations": {}, @@ -14445,7 +14448,7 @@ "type": "bonfire", "title": "Problem 421: Prime factors of n15+1", "tests": [ - "assert.strictEqual(euler421(), 2304215802083466200, 'message: \u003ccode\u003eeuler421()\u003c/code\u003e should return 2304215802083466200.');" + "assert.strictEqual(euler421(), 2304215802083466200, 'message: euler421() should return 2304215802083466200.');" ], "solutions": [], "translations": {}, @@ -14458,7 +14461,7 @@ "euler421();" ], "description": [ - "Numbers of the form n15+1 are composite for every integer n \u003e 1.", + "Numbers of the form n15+1 are composite for every integer n > 1.", "For positive integers n and m let s(n,m) be defined as the sum of the distinct prime factors of n15+1 not exceeding m.", "", "E.g. 215+1 = 3×3×11×331.", @@ -14475,7 +14478,7 @@ "type": "bonfire", "title": "Problem 422: Sequence of points on a hyperbola", "tests": [ - "assert.strictEqual(euler422(), 92060460, 'message: \u003ccode\u003eeuler422()\u003c/code\u003e should return 92060460.');" + "assert.strictEqual(euler422(), 92060460, 'message: euler422() should return 92060460.');" ], "solutions": [], "translations": {}, @@ -14495,7 +14498,7 @@ "Now we define a sequence of points in H, {Pi : i ≥ 1}, as:", " P1 = (13, 61/4).", " P2 = (-43/6, -4).", - " For i \u003e 2, Pi is the unique point in H that is different from Pi-1 and such that line PiPi-1 is parallel to line Pi-2X. It can be shown that Pi is well-defined, and that its coordinates are always rational.", + " For i > 2, Pi is the unique point in H that is different from Pi-1 and such that line PiPi-1 is parallel to line Pi-2X. It can be shown that Pi is well-defined, and that its coordinates are always rational.", "You are given that P3 = (-19/2, -229/24), P4 = (1267/144, -37/12) and P7 = (17194218091/143327232, 274748766781/1719926784).", "", "Find Pn for n = 1114 in the following format:If Pn = (a/b, c/d) where the fractions are in lowest terms and the denominators are positive, then the answer is (a + b + c + d) mod 1 000 000 007.", @@ -14509,7 +14512,7 @@ "type": "bonfire", "title": "Problem 423: Consecutive die throws", "tests": [ - "assert.strictEqual(euler423(), 653972374, 'message: \u003ccode\u003eeuler423()\u003c/code\u003e should return 653972374.');" + "assert.strictEqual(euler423(), 653972374, 'message: euler423() should return 653972374.');" ], "solutions": [], "translations": {}, @@ -14548,7 +14551,7 @@ "type": "bonfire", "title": "Problem 424: Kakuro", "tests": [ - "assert.strictEqual(euler424(), 1059760019628, 'message: \u003ccode\u003eeuler424()\u003c/code\u003e should return 1059760019628.');" + "assert.strictEqual(euler424(), 1059760019628, 'message: euler424() should return 1059760019628.');" ], "solutions": [], "translations": {}, @@ -14590,7 +14593,7 @@ "type": "bonfire", "title": "Problem 425: Prime connection", "tests": [ - "assert.strictEqual(euler425(), 46479497324, 'message: \u003ccode\u003eeuler425()\u003c/code\u003e should return 46479497324.');" + "assert.strictEqual(euler425(), 46479497324, 'message: euler425() should return 46479497324.');" ], "solutions": [], "translations": {}, @@ -14629,7 +14632,7 @@ "type": "bonfire", "title": "Problem 426: Box-ball system", "tests": [ - "assert.strictEqual(euler426(), 31591886008, 'message: \u003ccode\u003eeuler426()\u003c/code\u003e should return 31591886008.');" + "assert.strictEqual(euler426(), 31591886008, 'message: euler426() should return 31591886008.');" ], "solutions": [], "translations": {}, @@ -14680,7 +14683,7 @@ "type": "bonfire", "title": "Problem 427: n-sequences", "tests": [ - "assert.strictEqual(euler427(), 97138867, 'message: \u003ccode\u003eeuler427()\u003c/code\u003e should return 97138867.');" + "assert.strictEqual(euler427(), 97138867, 'message: euler427() should return 97138867.');" ], "solutions": [], "translations": {}, @@ -14712,7 +14715,7 @@ "type": "bonfire", "title": "Problem 428: About Project Euler", "tests": [ - "assert.strictEqual(euler428(), 747215561862, 'message: \u003ccode\u003eeuler428()\u003c/code\u003e should return 747215561862.');" + "assert.strictEqual(euler428(), 747215561862, 'message: euler428() should return 747215561862.');" ], "solutions": [], "translations": {}, @@ -14734,7 +14737,7 @@ "type": "bonfire", "title": "Problem 429: Sum of squares of unitary divisors", "tests": [ - "assert.strictEqual(euler429(), 98792821, 'message: \u003ccode\u003eeuler429()\u003c/code\u003e should return 98792821.');" + "assert.strictEqual(euler429(), 98792821, 'message: euler429() should return 98792821.');" ], "solutions": [], "translations": {}, @@ -14764,7 +14767,7 @@ "type": "bonfire", "title": "Problem 430: Range flips", "tests": [ - "assert.strictEqual(euler430(), 5000624921.38, 'message: \u003ccode\u003eeuler430()\u003c/code\u003e should return 5000624921.38.');" + "assert.strictEqual(euler430(), 5000624921.38, 'message: euler430() should return 5000624921.38.');" ], "solutions": [], "translations": {}, @@ -14800,7 +14803,7 @@ "type": "bonfire", "title": "Problem 431: Square Space Silo", "tests": [ - "assert.strictEqual(euler431(), 23.386029052, 'message: \u003ccode\u003eeuler431()\u003c/code\u003e should return 23.386029052.');" + "assert.strictEqual(euler431(), 23.386029052, 'message: euler431() should return 23.386029052.');" ], "solutions": [], "translations": {}, @@ -14833,7 +14836,7 @@ "type": "bonfire", "title": "Problem 432: Totient sum", "tests": [ - "assert.strictEqual(euler432(), 754862080, 'message: \u003ccode\u003eeuler432()\u003c/code\u003e should return 754862080.');" + "assert.strictEqual(euler432(), 754862080, 'message: euler432() should return 754862080.');" ], "solutions": [], "translations": {}, @@ -14860,7 +14863,7 @@ "type": "bonfire", "title": "Problem 433: Steps in Euclid's algorithm", "tests": [ - "assert.strictEqual(euler433(), 326624372659664, 'message: \u003ccode\u003eeuler433()\u003c/code\u003e should return 326624372659664.');" + "assert.strictEqual(euler433(), 326624372659664, 'message: euler433() should return 326624372659664.');" ], "solutions": [], "translations": {}, @@ -14893,7 +14896,7 @@ "type": "bonfire", "title": "Problem 434: Rigid graphs", "tests": [ - "assert.strictEqual(euler434(), 863253606, 'message: \u003ccode\u003eeuler434()\u003c/code\u003e should return 863253606.');" + "assert.strictEqual(euler434(), 863253606, 'message: euler434() should return 863253606.');" ], "solutions": [], "translations": {}, @@ -14930,7 +14933,7 @@ "type": "bonfire", "title": "Problem 435: Polynomials of Fibonacci numbers", "tests": [ - "assert.strictEqual(euler435(), 252541322550, 'message: \u003ccode\u003eeuler435()\u003c/code\u003e should return 252541322550.');" + "assert.strictEqual(euler435(), 252541322550, 'message: euler435() should return 252541322550.');" ], "solutions": [], "translations": {}, @@ -14955,7 +14958,7 @@ "type": "bonfire", "title": "Problem 436: Unfair wager", "tests": [ - "assert.strictEqual(euler436(), 0.5276662759, 'message: \u003ccode\u003eeuler436()\u003c/code\u003e should return 0.5276662759.');" + "assert.strictEqual(euler436(), 0.5276662759, 'message: euler436() should return 0.5276662759.');" ], "solutions": [], "translations": {}, @@ -14972,13 +14975,13 @@ "She suggests they play a game of chance to determine who will wash the dishes.", "For this game, they shall use a generator of independent random numbers uniformly distributed between 0 and 1.", "The game starts with S = 0.", - "The first player, Louise, adds to S different random numbers from the generator until S \u003e 1 and records her last random number 'x'.", - "The second player, Julie, continues adding to S different random numbers from the generator until S \u003e 2 and records her last random number 'y'.", - "The player with the highest number wins and the loser washes the dishes, i.e. if y \u003e x the second player wins.", + "The first player, Louise, adds to S different random numbers from the generator until S > 1 and records her last random number 'x'.", + "The second player, Julie, continues adding to S different random numbers from the generator until S > 2 and records her last random number 'y'.", + "The player with the highest number wins and the loser washes the dishes, i.e. if y > x the second player wins.", "", - "For example, if the first player draws 0.62 and 0.44, the first player turn ends since 0.62+0.44 \u003e 1 and x = 0.44.", - "If the second players draws 0.1, 0.27 and 0.91, the second player turn ends since 0.62+0.44+0.1+0.27+0.91 \u003e 2 and y = 0.91.", - "Since y \u003e x, the second player wins.", + "For example, if the first player draws 0.62 and 0.44, the first player turn ends since 0.62+0.44 > 1 and x = 0.44.", + "If the second players draws 0.1, 0.27 and 0.91, the second player turn ends since 0.62+0.44+0.1+0.27+0.91 > 2 and y = 0.91.", + "Since y > x, the second player wins.", "", "Louise thinks about it for a second, and objects: \"That's not fair\".", "What is the probability that the second player wins?", @@ -14991,7 +14994,7 @@ "type": "bonfire", "title": "Problem 437: Fibonacci primitive roots", "tests": [ - "assert.strictEqual(euler437(), 74204709657207, 'message: \u003ccode\u003eeuler437()\u003c/code\u003e should return 74204709657207.');" + "assert.strictEqual(euler437(), 74204709657207, 'message: euler437() should return 74204709657207.');" ], "solutions": [], "translations": {}, @@ -15031,7 +15034,7 @@ "type": "bonfire", "title": "Problem 438: Integer part of polynomial equation's solutions", "tests": [ - "assert.strictEqual(euler438(), 2046409616809, 'message: \u003ccode\u003eeuler438()\u003c/code\u003e should return 2046409616809.');" + "assert.strictEqual(euler438(), 2046409616809, 'message: euler438() should return 2046409616809.');" ], "solutions": [], "translations": {}, @@ -15065,7 +15068,7 @@ "type": "bonfire", "title": "Problem 439: Sum of sum of divisors", "tests": [ - "assert.strictEqual(euler439(), 968697378, 'message: \u003ccode\u003eeuler439()\u003c/code\u003e should return 968697378.');" + "assert.strictEqual(euler439(), 968697378, 'message: euler439() should return 968697378.');" ], "solutions": [], "translations": {}, @@ -15092,7 +15095,7 @@ "type": "bonfire", "title": "Problem 440: GCD and Tiling", "tests": [ - "assert.strictEqual(euler440(), 970746056, 'message: \u003ccode\u003eeuler440()\u003c/code\u003e should return 970746056.');" + "assert.strictEqual(euler440(), 970746056, 'message: euler440() should return 970746056.');" ], "solutions": [], "translations": {}, @@ -15128,7 +15131,7 @@ "type": "bonfire", "title": "Problem 441: The inverse summation of coprime couples", "tests": [ - "assert.strictEqual(euler441(), 5000088.8395, 'message: \u003ccode\u003eeuler441()\u003c/code\u003e should return 5000088.8395.');" + "assert.strictEqual(euler441(), 5000088.8395, 'message: euler441() should return 5000088.8395.');" ], "solutions": [], "translations": {}, @@ -15143,7 +15146,7 @@ "description": [ "For an integer M, we define R(M) as the sum of 1/(p·q) for all the integer pairs p and q which satisfy all of these conditions:", "", - " 1 ≤ p \u003c q ≤ M", + " 1 ≤ p < q ≤ M", " p + q ≥ M", " p and q are coprime.", "", @@ -15160,7 +15163,7 @@ "type": "bonfire", "title": "Problem 442: Eleven-free integers", "tests": [ - "assert.strictEqual(euler442(), 1295552661530920200, 'message: \u003ccode\u003eeuler442()\u003c/code\u003e should return 1295552661530920200.');" + "assert.strictEqual(euler442(), 1295552661530920200, 'message: euler442() should return 1295552661530920200.');" ], "solutions": [], "translations": {}, @@ -15188,7 +15191,7 @@ "type": "bonfire", "title": "Problem 443: GCD sequence", "tests": [ - "assert.strictEqual(euler443(), 2744233049300770, 'message: \u003ccode\u003eeuler443()\u003c/code\u003e should return 2744233049300770.');" + "assert.strictEqual(euler443(), 2744233049300770, 'message: euler443() should return 2744233049300770.');" ], "solutions": [], "translations": {}, @@ -15203,7 +15206,7 @@ "description": [ "Let g(n) be a sequence defined as follows:", "g(4) = 13,", - "g(n) = g(n-1) + gcd(n, g(n-1)) for n \u003e 4.", + "g(n) = g(n-1) + gcd(n, g(n-1)) for n > 4.", "", "The first few values are:", "", @@ -15222,7 +15225,7 @@ "type": "bonfire", "title": "Problem 444: The Roundtable Lottery", "tests": [ - "assert.strictEqual(euler444(), 1.200856722e+263, 'message: \u003ccode\u003eeuler444()\u003c/code\u003e should return 1.200856722e+263.');" + "assert.strictEqual(euler444(), 1.200856722e+263, 'message: euler444() should return 1.200856722e+263.');" ], "solutions": [], "translations": {}, @@ -15249,7 +15252,7 @@ "Let E(p) represent the expected number of players left at the table when the game ends in a game consisting of p players (e.g. E(111) = 5.2912 when rounded to 5 significant digits).", "", "Let S1(N) = E(p)", - "Let Sk(N) = Sk-1(p) for k \u003e 1", + "Let Sk(N) = Sk-1(p) for k > 1", "", "Find S20(1014) and write the answer in scientific notation rounded to 10 significant digits. Use a lowercase e to separate mantissa and exponent (e.g. S3(100) = 5.983679014e5)." ] @@ -15260,7 +15263,7 @@ "type": "bonfire", "title": "Problem 445: Retractions A", "tests": [ - "assert.strictEqual(euler445(), 659104042, 'message: \u003ccode\u003eeuler445()\u003c/code\u003e should return 659104042.');" + "assert.strictEqual(euler445(), 659104042, 'message: euler445() should return 659104042.');" ], "solutions": [], "translations": {}, @@ -15273,9 +15276,9 @@ "euler445();" ], "description": [ - "For every integer n\u003e1, the family of functions fn,a,b is defined ", - "by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0\u003ca\u003cn, 0≤b\u003cn, 0≤x\u003cn.", - "We will call fn,a,b a retraction if fn,a,b(fn,a,b(x))≡fn,a,b(x) mod n for every 0≤x\u003cn.", + "For every integer n>1, the family of functions fn,a,b is defined ", + "by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0euler446() should return 907803852.');" ], "solutions": [], "translations": {}, @@ -15306,9 +15309,9 @@ "euler446();" ], "description": [ - "For every integer n\u003e1, the family of functions fn,a,b is defined ", - "by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0\u003ca\u003cn, 0≤b\u003cn, 0≤x\u003cn.", - "We will call fn,a,b a retraction if fn,a,b(fn,a,b(x))≡fn,a,b(x) mod n for every 0≤x\u003cn.", + "For every integer n>1, the family of functions fn,a,b is defined ", + "by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0euler447() should return 530553372.');" ], "solutions": [], "translations": {}, @@ -15337,9 +15340,9 @@ "euler447();" ], "description": [ - "For every integer n\u003e1, the family of functions fn,a,b is defined ", - "by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0\u003ca\u003cn, 0≤b\u003cn, 0≤x\u003cn.", - "We will call fn,a,b a retraction if fn,a,b(fn,a,b(x))≡fn,a,b(x) mod n for every 0≤x\u003cn.", + "For every integer n>1, the family of functions fn,a,b is defined ", + "by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0euler448() should return 106467648.');" ], "solutions": [], "translations": {}, @@ -15386,7 +15389,7 @@ "type": "bonfire", "title": "Problem 449: Chocolate covered candy", "tests": [ - "assert.strictEqual(euler449(), 103.37870096, 'message: \u003ccode\u003eeuler449()\u003c/code\u003e should return 103.37870096.');" + "assert.strictEqual(euler449(), 103.37870096, 'message: euler449() should return 103.37870096.');" ], "solutions": [], "translations": {}, @@ -15420,7 +15423,7 @@ "type": "bonfire", "title": "Problem 450: Hypocycloid and Lattice points", "tests": [ - "assert.strictEqual(euler450(), 583333163984220900, 'message: \u003ccode\u003eeuler450()\u003c/code\u003e should return 583333163984220900.');" + "assert.strictEqual(euler450(), 583333163984220900, 'message: euler450() should return 583333163984220900.');" ], "solutions": [], "translations": {}, @@ -15444,7 +15447,7 @@ "Let $S(R, r) = \\sum_{(x,y) \\in C(R, r)} |x| + |y|$ be the sum of the absolute values of the x and y coordinates of the points in $C(R, r)$.", "", "", - "Let $T(N) = \\sum_{R = 3}^N \\sum_{r=1}^{\\lfloor \\frac {R - 1} 2 \\rfloor} S(R, r)$ be the sum of $S(R, r)$ for R and r positive integers, $R\\leq N$ and $2r \u003c R$.", + "Let $T(N) = \\sum_{R = 3}^N \\sum_{r=1}^{\\lfloor \\frac {R - 1} 2 \\rfloor} S(R, r)$ be the sum of $S(R, r)$ for R and r positive integers, $R\\leq N$ and $2r < R$.", "", "", "You are given:C(3, 1) =", @@ -15470,7 +15473,7 @@ "type": "bonfire", "title": "Problem 451: Modular inverses", "tests": [ - "assert.strictEqual(euler451(), 153651073760956, 'message: \u003ccode\u003eeuler451()\u003c/code\u003e should return 153651073760956.');" + "assert.strictEqual(euler451(), 153651073760956, 'message: euler451() should return 153651073760956.');" ], "solutions": [], "translations": {}, @@ -15507,7 +15510,7 @@ "type": "bonfire", "title": "Problem 452: Long Products", "tests": [ - "assert.strictEqual(euler452(), 345558983, 'message: \u003ccode\u003eeuler452()\u003c/code\u003e should return 345558983.');" + "assert.strictEqual(euler452(), 345558983, 'message: euler452() should return 345558983.');" ], "solutions": [], "translations": {}, @@ -15532,7 +15535,7 @@ "type": "bonfire", "title": "Problem 453: Lattice Quadrilaterals", "tests": [ - "assert.strictEqual(euler453(), 104354107, 'message: \u003ccode\u003eeuler453()\u003c/code\u003e should return 104354107.');" + "assert.strictEqual(euler453(), 104354107, 'message: euler453() should return 104354107.');" ], "solutions": [], "translations": {}, @@ -15562,7 +15565,7 @@ "type": "bonfire", "title": "Problem 454: Diophantine reciprocals III", "tests": [ - "assert.strictEqual(euler454(), 5435004633092, 'message: \u003ccode\u003eeuler454()\u003c/code\u003e should return 5435004633092.');" + "assert.strictEqual(euler454(), 5435004633092, 'message: euler454() should return 5435004633092.');" ], "solutions": [], "translations": {}, @@ -15583,7 +15586,7 @@ " = ", "1n", "", - "For a limit L we define F(L) as the number of solutions which satisfy x \u003c y ≤ L.", + "For a limit L we define F(L) as the number of solutions which satisfy x < y ≤ L.", "", "We can verify that F(15) = 4 and F(1000) = 1069.", "Find F(1012)." @@ -15595,7 +15598,7 @@ "type": "bonfire", "title": "Problem 455: Powers With Trailing Digits", "tests": [ - "assert.strictEqual(euler455(), 450186511399999, 'message: \u003ccode\u003eeuler455()\u003c/code\u003e should return 450186511399999.');" + "assert.strictEqual(euler455(), 450186511399999, 'message: euler455() should return 450186511399999.');" ], "solutions": [], "translations": {}, @@ -15625,7 +15628,7 @@ "type": "bonfire", "title": "Problem 456: Triangles containing the origin II", "tests": [ - "assert.strictEqual(euler456(), 333333208685971500, 'message: \u003ccode\u003eeuler456()\u003c/code\u003e should return 333333208685971500.');" + "assert.strictEqual(euler456(), 333333208685971500, 'message: euler456() should return 333333208685971500.');" ], "solutions": [], "translations": {}, @@ -15662,7 +15665,7 @@ "type": "bonfire", "title": "Problem 457: A polynomial modulo the square of a prime", "tests": [ - "assert.strictEqual(euler457(), 2647787126797397000, 'message: \u003ccode\u003eeuler457()\u003c/code\u003e should return 2647787126797397000.');" + "assert.strictEqual(euler457(), 2647787126797397000, 'message: euler457() should return 2647787126797397000.');" ], "solutions": [], "translations": {}, @@ -15692,7 +15695,7 @@ "type": "bonfire", "title": "Problem 458: Permutations of Project", "tests": [ - "assert.strictEqual(euler458(), 423341841, 'message: \u003ccode\u003eeuler458()\u003c/code\u003e should return 423341841.');" + "assert.strictEqual(euler458(), 423341841, 'message: euler458() should return 423341841.');" ], "solutions": [], "translations": {}, @@ -15720,7 +15723,7 @@ "type": "bonfire", "title": "Problem 459: Flipping game", "tests": [ - "assert.strictEqual(euler459(), 3996390106631, 'message: \u003ccode\u003eeuler459()\u003c/code\u003e should return 3996390106631.');" + "assert.strictEqual(euler459(), 3996390106631, 'message: euler459() should return 3996390106631.');" ], "solutions": [], "translations": {}, @@ -15762,7 +15765,7 @@ "type": "bonfire", "title": "Problem 460: An ant on the move", "tests": [ - "assert.strictEqual(euler460(), 18.420738199, 'message: \u003ccode\u003eeuler460()\u003c/code\u003e should return 18.420738199.');" + "assert.strictEqual(euler460(), 18.420738199, 'message: euler460() should return 18.420738199.');" ], "solutions": [], "translations": {}, @@ -15804,7 +15807,7 @@ "type": "bonfire", "title": "Problem 461: Almost Pi", "tests": [ - "assert.strictEqual(euler461(), 159820276, 'message: \u003ccode\u003eeuler461()\u003c/code\u003e should return 159820276.');" + "assert.strictEqual(euler461(), 159820276, 'message: euler461() should return 159820276.');" ], "solutions": [], "translations": {}, @@ -15832,7 +15835,7 @@ "type": "bonfire", "title": "Problem 462: Permutation of 3-smooth numbers", "tests": [ - "assert.strictEqual(euler462(), Infinity, 'message: \u003ccode\u003eeuler462()\u003c/code\u003e should return Infinity.');" + "assert.strictEqual(euler462(), Infinity, 'message: euler462() should return Infinity.');" ], "solutions": [], "translations": {}, @@ -15868,7 +15871,7 @@ "type": "bonfire", "title": "Problem 463: A weird recurrence relation", "tests": [ - "assert.strictEqual(euler463(), 808981553, 'message: \u003ccode\u003eeuler463()\u003c/code\u003e should return 808981553.');" + "assert.strictEqual(euler463(), 808981553, 'message: euler463() should return 808981553.');" ], "solutions": [], "translations": {}, @@ -15899,7 +15902,7 @@ "type": "bonfire", "title": "Problem 464: Möbius function and intervals", "tests": [ - "assert.strictEqual(euler464(), 198775297232878, 'message: \u003ccode\u003eeuler464()\u003c/code\u003e should return 198775297232878.');" + "assert.strictEqual(euler464(), 198775297232878, 'message: euler464() should return 198775297232878.');" ], "solutions": [], "translations": {}, @@ -15940,7 +15943,7 @@ "type": "bonfire", "title": "Problem 465: Polar polygons", "tests": [ - "assert.strictEqual(euler465(), 585965659, 'message: \u003ccode\u003eeuler465()\u003c/code\u003e should return 585965659.');" + "assert.strictEqual(euler465(), 585965659, 'message: euler465() should return 585965659.');" ], "solutions": [], "translations": {}, @@ -15978,7 +15981,7 @@ "type": "bonfire", "title": "Problem 466: Distinct terms in a multiplication table", "tests": [ - "assert.strictEqual(euler466(), 258381958195474750, 'message: \u003ccode\u003eeuler466()\u003c/code\u003e should return 258381958195474750.');" + "assert.strictEqual(euler466(), 258381958195474750, 'message: euler466() should return 258381958195474750.');" ], "solutions": [], "translations": {}, @@ -16015,7 +16018,7 @@ "type": "bonfire", "title": "Problem 467: Superinteger", "tests": [ - "assert.strictEqual(euler467(), 775181359, 'message: \u003ccode\u003eeuler467()\u003c/code\u003e should return 775181359.');" + "assert.strictEqual(euler467(), 775181359, 'message: euler467() should return 775181359.');" ], "solutions": [], "translations": {}, @@ -16055,7 +16058,7 @@ "type": "bonfire", "title": "Problem 468: Smooth divisors of binomial coefficients", "tests": [ - "assert.strictEqual(euler468(), 852950321, 'message: \u003ccode\u003eeuler468()\u003c/code\u003e should return 852950321.');" + "assert.strictEqual(euler468(), 852950321, 'message: euler468() should return 852950321.');" ], "solutions": [], "translations": {}, @@ -16091,7 +16094,7 @@ "type": "bonfire", "title": "Problem 469: Empty chairs", "tests": [ - "assert.strictEqual(euler469(), 0.56766764161831, 'message: \u003ccode\u003eeuler469()\u003c/code\u003e should return 0.56766764161831.');" + "assert.strictEqual(euler469(), 0.56766764161831, 'message: euler469() should return 0.56766764161831.');" ], "solutions": [], "translations": {}, @@ -16123,7 +16126,7 @@ "type": "bonfire", "title": "Problem 470: Super Ramvok", "tests": [ - "assert.strictEqual(euler470(), 147668794, 'message: \u003ccode\u003eeuler470()\u003c/code\u003e should return 147668794.');" + "assert.strictEqual(euler470(), 147668794, 'message: euler470() should return 147668794.');" ], "solutions": [], "translations": {}, @@ -16138,7 +16141,7 @@ "description": [ "Consider a single game of Ramvok:", "", - "Let t represent the maximum number of turns the game lasts. If t = 0, then the game ends immediately. Otherwise, on each turn i, the player rolls a die. After rolling, if i \u003c t the player can either stop the game and receive a prize equal to the value of the current roll, or discard the roll and try again next turn. If i = t, then the roll cannot be discarded and the prize must be accepted. Before the game begins, t is chosen by the player, who must then pay an up-front cost ct for some constant c. For c = 0, t can be chosen to be infinite (with an up-front cost of 0). Let R(d, c) be the expected profit (i.e. net gain) that the player receives from a single game of optimally-played Ramvok, given a fair d-sided die and cost constant c. For example, R(4, 0.2) = 2.65. Assume that the player has sufficient funds for paying any/all up-front costs.", + "Let t represent the maximum number of turns the game lasts. If t = 0, then the game ends immediately. Otherwise, on each turn i, the player rolls a die. After rolling, if i < t the player can either stop the game and receive a prize equal to the value of the current roll, or discard the roll and try again next turn. If i = t, then the roll cannot be discarded and the prize must be accepted. Before the game begins, t is chosen by the player, who must then pay an up-front cost ct for some constant c. For c = 0, t can be chosen to be infinite (with an up-front cost of 0). Let R(d, c) be the expected profit (i.e. net gain) that the player receives from a single game of optimally-played Ramvok, given a fair d-sided die and cost constant c. For example, R(4, 0.2) = 2.65. Assume that the player has sufficient funds for paying any/all up-front costs.", "", "Now consider a game of Super Ramvok:", "", @@ -16157,7 +16160,7 @@ "type": "bonfire", "title": "Problem 471: Triangle inscribed in ellipse", "tests": [ - "assert.strictEqual(euler471(), 1.895093981e+31, 'message: \u003ccode\u003eeuler471()\u003c/code\u003e should return 1.895093981e+31.');" + "assert.strictEqual(euler471(), 1.895093981e+31, 'message: euler471() should return 1.895093981e+31.');" ], "solutions": [], "translations": {}, @@ -16170,7 +16173,7 @@ "euler471();" ], "description": [ - "The triangle ΔABC is inscribed in an ellipse with equation $\\frac {x^2} {a^2} + \\frac {y^2} {b^2} = 1$, 0 \u003c 2b \u003c a, a and b integers.", + "The triangle ΔABC is inscribed in an ellipse with equation $\\frac {x^2} {a^2} + \\frac {y^2} {b^2} = 1$, 0 < 2b < a, a and b integers.", "Let r(a,b) be the radius of the incircle of ΔABC when the incircle has center (2b, 0) and A has coordinates $\\left( \\frac a 2, \\frac {\\sqrt 3} 2 b\\right)$.", "For example, r(3,1) = ½, r(6,2) = 1, r(12,3) = 2.", "", @@ -16188,7 +16191,7 @@ "type": "bonfire", "title": "Problem 472: Comfortable Distance II", "tests": [ - "assert.strictEqual(euler472(), 73811586, 'message: \u003ccode\u003eeuler472()\u003c/code\u003e should return 73811586.');" + "assert.strictEqual(euler472(), 73811586, 'message: euler472() should return 73811586.');" ], "solutions": [], "translations": {}, @@ -16205,7 +16208,7 @@ "No person sits beside another.", "The first person chooses any seat.", "Each subsequent person chooses the seat furthest from anyone else already seated, as long as it does not violate rule 1. If there is more than one choice satisfying this condition, then the person chooses the leftmost choice.", - "Note that due to rule 1, some seats will surely be left unoccupied, and the maximum number of people that can be seated is less than N (for N \u003e 1).", + "Note that due to rule 1, some seats will surely be left unoccupied, and the maximum number of people that can be seated is less than N (for N > 1).", "", "Here are the possible seating arrangements for N = 15:", "", @@ -16227,7 +16230,7 @@ "type": "bonfire", "title": "Problem 473: Phigital number base", "tests": [ - "assert.strictEqual(euler473(), 35856681704365, 'message: \u003ccode\u003eeuler473()\u003c/code\u003e should return 35856681704365.');" + "assert.strictEqual(euler473(), 35856681704365, 'message: euler473() should return 35856681704365.');" ], "solutions": [], "translations": {}, @@ -16266,7 +16269,7 @@ "type": "bonfire", "title": "Problem 474: Last digits of divisors", "tests": [ - "assert.strictEqual(euler474(), 9690646731515010, 'message: \u003ccode\u003eeuler474()\u003c/code\u003e should return 9690646731515010.');" + "assert.strictEqual(euler474(), 9690646731515010, 'message: euler474() should return 9690646731515010.');" ], "solutions": [], "translations": {}, @@ -16295,7 +16298,7 @@ "type": "bonfire", "title": "Problem 475: Music festival", "tests": [ - "assert.strictEqual(euler475(), 75780067, 'message: \u003ccode\u003eeuler475()\u003c/code\u003e should return 75780067.');" + "assert.strictEqual(euler475(), 75780067, 'message: euler475() should return 75780067.');" ], "solutions": [], "translations": {}, @@ -16324,7 +16327,7 @@ "type": "bonfire", "title": "Problem 476: Circle Packing II", "tests": [ - "assert.strictEqual(euler476(), 110242.87794, 'message: \u003ccode\u003eeuler476()\u003c/code\u003e should return 110242.87794.');" + "assert.strictEqual(euler476(), 110242.87794, 'message: euler476() should return 110242.87794.');" ], "solutions": [], "translations": {}, @@ -16338,7 +16341,7 @@ ], "description": [ "Let R(a, b, c) be the maximum area covered by three non-overlapping circles inside a triangle with edge lengths a, b and c.", - "Let S(n) be the average value of R(a, b, c) over all integer triplets (a, b, c) such that 1 ≤ a ≤ b ≤ c \u003c a + b ≤ n", + "Let S(n) be the average value of R(a, b, c) over all integer triplets (a, b, c) such that 1 ≤ a ≤ b ≤ c < a + b ≤ n", "You are given S(2) = R(1, 1, 1) ≈ 0.31998, S(5) ≈ 1.25899.", "Find S(1803) rounded to 5 decimal places behind the decimal point." ] @@ -16349,7 +16352,7 @@ "type": "bonfire", "title": "Problem 477: Number Sequence Game", "tests": [ - "assert.strictEqual(euler477(), 25044905874565164, 'message: \u003ccode\u003eeuler477()\u003c/code\u003e should return 25044905874565164.');" + "assert.strictEqual(euler477(), 25044905874565164, 'message: euler477() should return 25044905874565164.');" ], "solutions": [], "translations": {}, @@ -16385,7 +16388,7 @@ "type": "bonfire", "title": "Problem 478: Mixtures", "tests": [ - "assert.strictEqual(euler478(), 59510340, 'message: \u003ccode\u003eeuler478()\u003c/code\u003e should return 59510340.');" + "assert.strictEqual(euler478(), 59510340, 'message: euler478() should return 59510340.');" ], "solutions": [], "translations": {}, @@ -16427,7 +16430,7 @@ "type": "bonfire", "title": "Problem 479: Roots on the Rise", "tests": [ - "assert.strictEqual(euler479(), 191541795, 'message: \u003ccode\u003eeuler479()\u003c/code\u003e should return 191541795.');" + "assert.strictEqual(euler479(), 191541795, 'message: euler479() should return 191541795.');" ], "solutions": [], "translations": {}, @@ -16457,7 +16460,7 @@ "type": "bonfire", "title": "Problem 480: The Last Question", "tests": [ - "assert.strictEqual(euler480(), turnthestarson, 'message: \u003ccode\u003eeuler480()\u003c/code\u003e should return turnthestarson.');" + "assert.strictEqual(euler480(), turnthestarson, 'message: euler480() should return turnthestarson.');" ], "solutions": [], "translations": {}, @@ -16517,7 +16520,7 @@ "type": "bonfire", "title": "Problem 481: Chef Showdown", "tests": [ - "assert.strictEqual(euler481(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler481()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler481(), TODO: MISSING ANSWER, 'message: euler481() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16549,7 +16552,7 @@ "type": "bonfire", "title": "Problem 482: The incenter of a triangle", "tests": [ - "assert.strictEqual(euler482(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler482()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler482(), TODO: MISSING ANSWER, 'message: euler482() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16581,7 +16584,7 @@ "type": "bonfire", "title": "Problem 483: Repeated permutation", "tests": [ - "assert.strictEqual(euler483(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler483()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler483(), TODO: MISSING ANSWER, 'message: euler483() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16620,7 +16623,7 @@ "type": "bonfire", "title": "Problem 484: Arithmetic Derivative", "tests": [ - "assert.strictEqual(euler484(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler484()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler484(), TODO: MISSING ANSWER, 'message: euler484() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16638,7 +16641,7 @@ "(ab)' = a'b + ab' for all integers a, b (Leibniz rule)", "For example, 20' = 24", "", - "Find ∑ gcd(k,k') for 1 \u003c k ≤ 5·1015", + "Find ∑ gcd(k,k') for 1 < k ≤ 5·1015", "", "Note: gcd(x,y) denotes the greatest common divisor of x and y." ] @@ -16649,7 +16652,7 @@ "type": "bonfire", "title": "Problem 485: Maximum number of divisors", "tests": [ - "assert.strictEqual(euler485(), 51281274340, 'message: \u003ccode\u003eeuler485()\u003c/code\u003e should return 51281274340.');" + "assert.strictEqual(euler485(), 51281274340, 'message: euler485() should return 51281274340.');" ], "solutions": [], "translations": {}, @@ -16679,7 +16682,7 @@ "type": "bonfire", "title": "Problem 486: Palindrome-containing strings", "tests": [ - "assert.strictEqual(euler486(), 11408450515, 'message: \u003ccode\u003eeuler486()\u003c/code\u003e should return 11408450515.');" + "assert.strictEqual(euler486(), 11408450515, 'message: euler486() should return 11408450515.');" ], "solutions": [], "translations": {}, @@ -16713,7 +16716,7 @@ "type": "bonfire", "title": "Problem 487: Sums of power sums", "tests": [ - "assert.strictEqual(euler487(), 106650212746, 'message: \u003ccode\u003eeuler487()\u003c/code\u003e should return 106650212746.');" + "assert.strictEqual(euler487(), 106650212746, 'message: euler487() should return 106650212746.');" ], "solutions": [], "translations": {}, @@ -16741,7 +16744,7 @@ "type": "bonfire", "title": "Problem 488: Unbalanced Nim", "tests": [ - "assert.strictEqual(euler488(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler488()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler488(), TODO: MISSING ANSWER, 'message: euler488() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16770,7 +16773,7 @@ "", "Unlike ordinary three-heap Nim, (0,1,2) and its permutations are the end states of this game.", "", - "For an integer N, we define F(N) as the sum of a+b+c for all the losing positions for the next player, with 0 \u003c a \u003c b \u003c c \u003c N.", + "For an integer N, we define F(N) as the sum of a+b+c for all the losing positions for the next player, with 0 < a < b < c < N.", "", "For example, F(8) = 42, because there are 4 losing positions for the next player, (1,3,5), (1,4,6), (2,3,6) and (2,4,5).", "We can also verify that F(128) = 496062.", @@ -16784,7 +16787,7 @@ "type": "bonfire", "title": "Problem 489: Common factors between two sequences", "tests": [ - "assert.strictEqual(euler489(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler489()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler489(), TODO: MISSING ANSWER, 'message: euler489() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16798,7 +16801,7 @@ ], "description": [ "Let G(a, b) be the smallest non-negative integer n for which gcd(n3 + b, (n + a)3 + b) is maximized.", - "For example, G(1, 1) = 5 because gcd(n3 + 1, (n + 1)3 + 1) reaches its maximum value of 7 for n = 5, and is smaller for 0 ≤ n \u003c 5.", + "For example, G(1, 1) = 5 because gcd(n3 + 1, (n + 1)3 + 1) reaches its maximum value of 7 for n = 5, and is smaller for 0 ≤ n < 5.", "Let H(m, n) = Σ G(a, b) for 1 ≤ a ≤ m, 1 ≤ b ≤ n.", "You are given H(5, 5) = 128878 and H(10, 10) = 32936544.", "Find H(18, 1900)." @@ -16810,7 +16813,7 @@ "type": "bonfire", "title": "Problem 490: Jumping frog", "tests": [ - "assert.strictEqual(euler490(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler490()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler490(), TODO: MISSING ANSWER, 'message: euler490() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16861,7 +16864,7 @@ "type": "bonfire", "title": "Problem 491: Double pandigital number divisible by 11", "tests": [ - "assert.strictEqual(euler491(), 194505988824000, 'message: \u003ccode\u003eeuler491()\u003c/code\u003e should return 194505988824000.');" + "assert.strictEqual(euler491(), 194505988824000, 'message: euler491() should return 194505988824000.');" ], "solutions": [], "translations": {}, @@ -16885,7 +16888,7 @@ "type": "bonfire", "title": "Problem 492: Exploding sequence", "tests": [ - "assert.strictEqual(euler492(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler492()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler492(), TODO: MISSING ANSWER, 'message: euler492() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16928,7 +16931,7 @@ "type": "bonfire", "title": "Problem 493: Under The Rainbow", "tests": [ - "assert.strictEqual(euler493(), 6.818741802, 'message: \u003ccode\u003eeuler493()\u003c/code\u003e should return 6.818741802.');" + "assert.strictEqual(euler493(), 6.818741802, 'message: euler493() should return 6.818741802.');" ], "solutions": [], "translations": {}, @@ -16952,7 +16955,7 @@ "type": "bonfire", "title": "Problem 494: Collatz prefix families", "tests": [ - "assert.strictEqual(euler494(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler494()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler494(), TODO: MISSING ANSWER, 'message: euler494() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -16974,7 +16977,7 @@ "Any number invalidating the conjecture would have an infinite length sequence prefix.", "", "", - "Let Sm be the set of all sequence prefixes of length m. Two sequences {a1, a2, ..., am} and {b1, b2, ..., bm} in Sm are said to belong to the same prefix family if ai \u003c aj if and only if bi \u003c bj for all 1 ≤ i,j ≤ m.", + "Let Sm be the set of all sequence prefixes of length m. Two sequences {a1, a2, ..., am} and {b1, b2, ..., bm} in Sm are said to belong to the same prefix family if ai < aj if and only if bi < bj for all 1 ≤ i,j ≤ m.", "", "", "For example, in S4, {6, 3, 10, 5} is in the same family as {454, 227, 682, 341}, but not {113, 340, 170, 85}.", @@ -16991,7 +16994,7 @@ "type": "bonfire", "title": "Problem 495: Writing n as the product of k distinct positive integers", "tests": [ - "assert.strictEqual(euler495(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler495()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler495(), TODO: MISSING ANSWER, 'message: euler495() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17024,7 +17027,7 @@ "type": "bonfire", "title": "Problem 496: Incenter and circumcenter of triangle", "tests": [ - "assert.strictEqual(euler496(), 2042473533769142800, 'message: \u003ccode\u003eeuler496()\u003c/code\u003e should return 2042473533769142800.');" + "assert.strictEqual(euler496(), 2042473533769142800, 'message: euler496() should return 2042473533769142800.');" ], "solutions": [], "translations": {}, @@ -17054,7 +17057,7 @@ "type": "bonfire", "title": "Problem 497: Drunken Tower of Hanoi", "tests": [ - "assert.strictEqual(euler497(), 684901360, 'message: \u003ccode\u003eeuler497()\u003c/code\u003e should return 684901360.');" + "assert.strictEqual(euler497(), 684901360, 'message: euler497() should return 684901360.');" ], "solutions": [], "translations": {}, @@ -17095,7 +17098,7 @@ "type": "bonfire", "title": "Problem 498: Remainder of polynomial division", "tests": [ - "assert.strictEqual(euler498(), 472294837, 'message: \u003ccode\u003eeuler498()\u003c/code\u003e should return 472294837.');" + "assert.strictEqual(euler498(), 472294837, 'message: euler498() should return 472294837.');" ], "solutions": [], "translations": {}, @@ -17124,7 +17127,7 @@ "type": "bonfire", "title": "Problem 499: St. Petersburg Lottery", "tests": [ - "assert.strictEqual(euler499(), 0.8660312, 'message: \u003ccode\u003eeuler499()\u003c/code\u003e should return 0.8660312.');" + "assert.strictEqual(euler499(), 0.8660312, 'message: euler499() should return 0.8660312.');" ], "solutions": [], "translations": {}, @@ -17142,7 +17145,7 @@ "", "The gambler cannot continue to play if his fortune falls below m pounds.", "Let pm(s) denote the probability that the gambler will never run out of money in this lottery given his initial fortune s and the cost per game m.", - "For example p2(2) ≈ 0.2522, p2(5) ≈ 0.6873 and p6(10 000) ≈ 0.9952 (note: pm(s) = 0 for s \u003c m).", + "For example p2(2) ≈ 0.2522, p2(5) ≈ 0.6873 and p6(10 000) ≈ 0.9952 (note: pm(s) = 0 for s < m).", "", "Find p15(109) and give your answer rounded to 7 decimal places behind the decimal point in the form 0.abcdefg." ] @@ -17153,7 +17156,7 @@ "type": "bonfire", "title": "Problem 500: Problem 500!!!", "tests": [ - "assert.strictEqual(euler500(), 35407281, 'message: \u003ccode\u003eeuler500()\u003c/code\u003e should return 35407281.');" + "assert.strictEqual(euler500(), 35407281, 'message: euler500() should return 35407281.');" ], "solutions": [], "translations": {}, @@ -17180,7 +17183,7 @@ "type": "bonfire", "title": "Problem 501: Eight Divisors", "tests": [ - "assert.strictEqual(euler501(), 197912312715, 'message: \u003ccode\u003eeuler501()\u003c/code\u003e should return 197912312715.');" + "assert.strictEqual(euler501(), 197912312715, 'message: euler501() should return 197912312715.');" ], "solutions": [], "translations": {}, @@ -17206,7 +17209,7 @@ "type": "bonfire", "title": "Problem 502: Counting Castles", "tests": [ - "assert.strictEqual(euler502(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler502()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler502(), TODO: MISSING ANSWER, 'message: euler502() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17247,7 +17250,7 @@ "type": "bonfire", "title": "Problem 503: Compromise or persist", "tests": [ - "assert.strictEqual(euler503(), 3.8694550145, 'message: \u003ccode\u003eeuler503()\u003c/code\u003e should return 3.8694550145.');" + "assert.strictEqual(euler503(), 3.8694550145, 'message: euler503() should return 3.8694550145.');" ], "solutions": [], "translations": {}, @@ -17282,7 +17285,7 @@ "type": "bonfire", "title": "Problem 504: Square on the Inside", "tests": [ - "assert.strictEqual(euler504(), 694687, 'message: \u003ccode\u003eeuler504()\u003c/code\u003e should return 694687.');" + "assert.strictEqual(euler504(), 694687, 'message: euler504() should return 694687.');" ], "solutions": [], "translations": {}, @@ -17310,7 +17313,7 @@ "type": "bonfire", "title": "Problem 505: Bidirectional Recurrence", "tests": [ - "assert.strictEqual(euler505(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler505()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler505(), TODO: MISSING ANSWER, 'message: euler505() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17324,9 +17327,9 @@ ], "description": [ "Let:", - "$\\begin{array}{ll} x(0)\u0026=0 \\\\ x(1)\u0026=1 \\\\ x(2k)\u0026=(3x(k)+2x(\\lfloor \\frac k 2 \\rfloor)) \\text{ mod } 2^{60} \\text{ for } k \\ge 1 \\text {, where } \\lfloor \\text { } \\rfloor \\text { is the floor function} \\\\ x(2k+1)\u0026=(2x(k)+3x(\\lfloor \\frac k 2 \\rfloor)) \\text{ mod } 2^{60} \\text{ for } k \\ge 1 \\\\ y_n(k)\u0026=\\left\\{{\\begin{array}{lc} x(k) \u0026\u0026 \\text{if } k \\ge n \\\\ 2^{60} - 1 - max(y_n(2k),y_n(2k+1)) \u0026\u0026 \\text{if } k \u003c n \\end{array}} \\right. \\\\ A(n)\u0026=y_n(1) \\end{array}$", + "$\\begin{array}{ll} x(0)&=0 \\\\ x(1)&=1 \\\\ x(2k)&=(3x(k)+2x(\\lfloor \\frac k 2 \\rfloor)) \\text{ mod } 2^{60} \\text{ for } k \\ge 1 \\text {, where } \\lfloor \\text { } \\rfloor \\text { is the floor function} \\\\ x(2k+1)&=(2x(k)+3x(\\lfloor \\frac k 2 \\rfloor)) \\text{ mod } 2^{60} \\text{ for } k \\ge 1 \\\\ y_n(k)&=\\left\\{{\\begin{array}{lc} x(k) && \\text{if } k \\ge n \\\\ 2^{60} - 1 - max(y_n(2k),y_n(2k+1)) && \\text{if } k < n \\end{array}} \\right. \\\\ A(n)&=y_n(1) \\end{array}$", "You are given:", - "$\\begin{array}{ll} x(2)\u0026=3 \\\\ x(3)\u0026=2 \\\\ x(4)\u0026=11 \\\\ y_4(4)\u0026=11 \\\\ y_4(3)\u0026=2^{60}-9\\\\ y_4(2)\u0026=2^{60}-12 \\\\ y_4(1)\u0026=A(4)=8 \\\\ A(10)\u0026=2^{60}-34\\\\ A(10^3)\u0026=101881 \\end{array}$", + "$\\begin{array}{ll} x(2)&=3 \\\\ x(3)&=2 \\\\ x(4)&=11 \\\\ y_4(4)&=11 \\\\ y_4(3)&=2^{60}-9\\\\ y_4(2)&=2^{60}-12 \\\\ y_4(1)&=A(4)=8 \\\\ A(10)&=2^{60}-34\\\\ A(10^3)&=101881 \\end{array}$", "Find $A(10^{12})$." ] }, @@ -17336,7 +17339,7 @@ "type": "bonfire", "title": "Problem 506: Clock sequence", "tests": [ - "assert.strictEqual(euler506(), 18934502, 'message: \u003ccode\u003eeuler506()\u003c/code\u003e should return 18934502.');" + "assert.strictEqual(euler506(), 18934502, 'message: euler506() should return 18934502.');" ], "solutions": [], "translations": {}, @@ -17365,7 +17368,7 @@ "type": "bonfire", "title": "Problem 507: Shortest Lattice Vector", "tests": [ - "assert.strictEqual(euler507(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler507()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler507(), TODO: MISSING ANSWER, 'message: euler507() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17404,7 +17407,7 @@ "type": "bonfire", "title": "Problem 508: Integers in base i-1", "tests": [ - "assert.strictEqual(euler508(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler508()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler508(), TODO: MISSING ANSWER, 'message: euler508() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17444,7 +17447,7 @@ "type": "bonfire", "title": "Problem 509: Divisor Nim", "tests": [ - "assert.strictEqual(euler509(), 151725678, 'message: \u003ccode\u003eeuler509()\u003c/code\u003e should return 151725678.');" + "assert.strictEqual(euler509(), 151725678, 'message: euler509() should return 151725678.');" ], "solutions": [], "translations": {}, @@ -17476,7 +17479,7 @@ "type": "bonfire", "title": "Problem 510: Tangent Circles", "tests": [ - "assert.strictEqual(euler510(), 315306518862563700, 'message: \u003ccode\u003eeuler510()\u003c/code\u003e should return 315306518862563700.');" + "assert.strictEqual(euler510(), 315306518862563700, 'message: euler510() should return 315306518862563700.');" ], "solutions": [], "translations": {}, @@ -17492,8 +17495,8 @@ "Circles A and B are tangent to each other and to line L at three distinct points.", "Circle C is inside the space between A, B and L, and tangent to all three.", "Let rA, rB and rC be the radii of A, B and C respectively.", - "Let S(n) = Σ rA + rB + rC, for 0 \u003c rA ≤ rB ≤ n where rA, rB and rC are integers.", - "The only solution for 0 \u003c rA ≤ rB ≤ 5 is rA = 4, rB = 4 and rC = 1, so S(5) = 4 + 4 + 1 = 9.", + "Let S(n) = Σ rA + rB + rC, for 0 < rA ≤ rB ≤ n where rA, rB and rC are integers.", + "The only solution for 0 < rA ≤ rB ≤ 5 is rA = 4, rB = 4 and rC = 1, so S(5) = 4 + 4 + 1 = 9.", "You are also given S(100) = 3072.", "Find S(109)." ] @@ -17504,7 +17507,7 @@ "type": "bonfire", "title": "Problem 511: Sequences with nice divisibility properties", "tests": [ - "assert.strictEqual(euler511(), 935247012, 'message: \u003ccode\u003eeuler511()\u003c/code\u003e should return 935247012.');" + "assert.strictEqual(euler511(), 935247012, 'message: euler511() should return 935247012.');" ], "solutions": [], "translations": {}, @@ -17545,7 +17548,7 @@ "type": "bonfire", "title": "Problem 512: Sums of totients of powers", "tests": [ - "assert.strictEqual(euler512(), 50660591862310320, 'message: \u003ccode\u003eeuler512()\u003c/code\u003e should return 50660591862310320.');" + "assert.strictEqual(euler512(), 50660591862310320, 'message: euler512() should return 50660591862310320.');" ], "solutions": [], "translations": {}, @@ -17573,7 +17576,7 @@ "type": "bonfire", "title": "Problem 513: Integral median", "tests": [ - "assert.strictEqual(euler513(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler513()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler513(), TODO: MISSING ANSWER, 'message: euler513() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17600,7 +17603,7 @@ "type": "bonfire", "title": "Problem 514: Geoboard Shapes", "tests": [ - "assert.strictEqual(euler514(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler514()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler514(), TODO: MISSING ANSWER, 'message: euler514() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17634,7 +17637,7 @@ "type": "bonfire", "title": "Problem 515: Dissonant Numbers", "tests": [ - "assert.strictEqual(euler515(), 2422639000800, 'message: \u003ccode\u003eeuler515()\u003c/code\u003e should return 2422639000800.');" + "assert.strictEqual(euler515(), 2422639000800, 'message: euler515() should return 2422639000800.');" ], "solutions": [], "translations": {}, @@ -17649,7 +17652,7 @@ "description": [ "Let d(p,n,0) be the multiplicative inverse of n modulo prime p, defined as n × d(p,n,0) = 1 mod p.", "Let d(p,n,k) = $\\sum_{i=1}^n$d(p,i,k−1) for k ≥ 1.", - "Let D(a,b,k) = $\\sum$(d(p,p-1,k) mod p) for all primes a ≤ p \u003c a + b.", + "Let D(a,b,k) = $\\sum$(d(p,p-1,k) mod p) for all primes a ≤ p < a + b.", "You are given:", "D(101,1,10) = 45", "D(103,102,102) = 8334", @@ -17662,7 +17665,7 @@ "type": "bonfire", "title": "Problem 516: 5-smooth totients", "tests": [ - "assert.strictEqual(euler516(), 939087315, 'message: \u003ccode\u003eeuler516()\u003c/code\u003e should return 939087315.');" + "assert.strictEqual(euler516(), 939087315, 'message: euler516() should return 939087315.');" ], "solutions": [], "translations": {}, @@ -17690,7 +17693,7 @@ "type": "bonfire", "title": "Problem 517: A real recursion", "tests": [ - "assert.strictEqual(euler517(), 581468882, 'message: \u003ccode\u003eeuler517()\u003c/code\u003e should return 581468882.');" + "assert.strictEqual(euler517(), 581468882, 'message: euler517() should return 581468882.');" ], "solutions": [], "translations": {}, @@ -17720,7 +17723,7 @@ "type": "bonfire", "title": "Problem 518: Prime triples and geometric sequences", "tests": [ - "assert.strictEqual(euler518(), 100315739184392, 'message: \u003ccode\u003eeuler518()\u003c/code\u003e should return 100315739184392.');" + "assert.strictEqual(euler518(), 100315739184392, 'message: euler518() should return 100315739184392.');" ], "solutions": [], "translations": {}, @@ -17736,7 +17739,7 @@ "Let S(n) = Σ a+b+c over all triples (a,b,c) such that:", "", "a, b, and c are prime numbers.", - "a \u003c b \u003c c \u003c n.", + "a < b < c < n.", "a+1, b+1, and c+1 form a geometric sequence.", "For example, S(100) = 1035 with the following triples: ", "", @@ -17751,7 +17754,7 @@ "type": "bonfire", "title": "Problem 519: Tricolored Coin Fountains", "tests": [ - "assert.strictEqual(euler519(), 804739330, 'message: \u003ccode\u003eeuler519()\u003c/code\u003e should return 804739330.');" + "assert.strictEqual(euler519(), 804739330, 'message: euler519() should return 804739330.');" ], "solutions": [], "translations": {}, @@ -17779,7 +17782,7 @@ "type": "bonfire", "title": "Problem 520: Simbers", "tests": [ - "assert.strictEqual(euler520(), 238413705, 'message: \u003ccode\u003eeuler520()\u003c/code\u003e should return 238413705.');" + "assert.strictEqual(euler520(), 238413705, 'message: euler520() should return 238413705.');" ], "solutions": [], "translations": {}, @@ -17809,7 +17812,7 @@ "type": "bonfire", "title": "Problem 521: Smallest prime factor", "tests": [ - "assert.strictEqual(euler521(), 44389811, 'message: \u003ccode\u003eeuler521()\u003c/code\u003e should return 44389811.');" + "assert.strictEqual(euler521(), 44389811, 'message: euler521() should return 44389811.');" ], "solutions": [], "translations": {}, @@ -17838,7 +17841,7 @@ "type": "bonfire", "title": "Problem 522: Hilbert's Blackout", "tests": [ - "assert.strictEqual(euler522(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler522()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler522(), TODO: MISSING ANSWER, 'message: euler522() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17876,7 +17879,7 @@ "type": "bonfire", "title": "Problem 523: First Sort I", "tests": [ - "assert.strictEqual(euler523(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler523()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler523(), TODO: MISSING ANSWER, 'message: euler523() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17914,7 +17917,7 @@ "type": "bonfire", "title": "Problem 524: First Sort II", "tests": [ - "assert.strictEqual(euler524(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler524()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler524(), TODO: MISSING ANSWER, 'message: euler524() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17957,7 +17960,7 @@ "type": "bonfire", "title": "Problem 525: Rolling Ellipse", "tests": [ - "assert.strictEqual(euler525(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler525()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler525(), TODO: MISSING ANSWER, 'message: euler525() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -17993,7 +17996,7 @@ "type": "bonfire", "title": "Problem 526: Largest prime factors of consecutive numbers", "tests": [ - "assert.strictEqual(euler526(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler526()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler526(), TODO: MISSING ANSWER, 'message: euler526() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18023,7 +18026,7 @@ "type": "bonfire", "title": "Problem 527: Randomized Binary Search", "tests": [ - "assert.strictEqual(euler527(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler527()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler527(), TODO: MISSING ANSWER, 'message: euler527() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18038,9 +18041,9 @@ "description": [ "A secret integer t is selected at random within the range 1 ≤ t ≤ n. ", "", - "The goal is to guess the value of t by making repeated guesses, via integer g. After a guess is made, there are three possible outcomes, in which it will be revealed that either g \u003c t, g = t, or g \u003e t. Then the process can repeat as necessary.", + "The goal is to guess the value of t by making repeated guesses, via integer g. After a guess is made, there are three possible outcomes, in which it will be revealed that either g < t, g = t, or g > t. Then the process can repeat as necessary.", "", - "Normally, the number of guesses required on average can be minimized with a binary search: Given a lower bound L and upper bound H (initialized to L = 1 and H = n), let g = ⌊(L+H)/2⌋ where ⌊⋅⌋ is the integer floor function. If g = t, the process ends. Otherwise, if g \u003c t, set L = g+1, but if g \u003e t instead, set H = g−1. After setting the new bounds, the search process repeats, and ultimately ends once t is found. Even if t can be deduced without searching, assume that a search will be required anyway to confirm the value.", + "Normally, the number of guesses required on average can be minimized with a binary search: Given a lower bound L and upper bound H (initialized to L = 1 and H = n), let g = ⌊(L+H)/2⌋ where ⌊⋅⌋ is the integer floor function. If g = t, the process ends. Otherwise, if g < t, set L = g+1, but if g > t instead, set H = g−1. After setting the new bounds, the search process repeats, and ultimately ends once t is found. Even if t can be deduced without searching, assume that a search will be required anyway to confirm the value.", "", "Your friend Bob believes that the standard binary search is not that much better than his randomized variant: Instead of setting g = ⌊(L+H)/2⌋, simply let g be a random integer between L and H, inclusive. The rest of the algorithm is the same as the standard binary search. This new search routine will be referred to as a random binary search.", "", @@ -18055,7 +18058,7 @@ "type": "bonfire", "title": "Problem 528: Constrained Sums", "tests": [ - "assert.strictEqual(euler528(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler528()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler528(), TODO: MISSING ANSWER, 'message: euler528() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18081,7 +18084,7 @@ "type": "bonfire", "title": "Problem 529: 10-substrings", "tests": [ - "assert.strictEqual(euler529(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler529()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler529(), TODO: MISSING ANSWER, 'message: euler529() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18110,7 +18113,7 @@ "type": "bonfire", "title": "Problem 530: GCD of Divisors", "tests": [ - "assert.strictEqual(euler530(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler530()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler530(), TODO: MISSING ANSWER, 'message: euler530() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18142,7 +18145,7 @@ "type": "bonfire", "title": "Problem 531: Chinese leftovers", "tests": [ - "assert.strictEqual(euler531(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler531()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler531(), TODO: MISSING ANSWER, 'message: euler531() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18168,7 +18171,7 @@ "Let f(n,m)=g(φ(n),n,φ(m),m)", "", "", - "Find ∑f(n,m) for 1000000 ≤ n \u003c m \u003c 1005000" + "Find ∑f(n,m) for 1000000 ≤ n < m < 1005000" ] }, { @@ -18177,7 +18180,7 @@ "type": "bonfire", "title": "Problem 532: Nanobots on Geodesics", "tests": [ - "assert.strictEqual(euler532(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler532()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler532(), TODO: MISSING ANSWER, 'message: euler532() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18209,7 +18212,7 @@ "type": "bonfire", "title": "Problem 533: Minimum values of the Carmichael function", "tests": [ - "assert.strictEqual(euler533(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler533()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler533(), TODO: MISSING ANSWER, 'message: euler533() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18237,7 +18240,7 @@ "type": "bonfire", "title": "Problem 534: Weak Queens", "tests": [ - "assert.strictEqual(euler534(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler534()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler534(), TODO: MISSING ANSWER, 'message: euler534() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18252,7 +18255,7 @@ "description": [ "The classical eight queens puzzle is the well known problem of placing eight chess queens on a 8×8 chessboard so that no two queens threaten each other. Allowing configurations to reappear in rotated or mirrored form, a total of 92 distinct configurations can be found for eight queens. The general case asks for the number of distinct ways of placing n queens on a n×n board, e.g. you can find 2 distinct configurations for n=4.", "", - "Lets define a weak queen on a n×n board to be a piece which can move any number of squares if moved horizontally, but a maximum of n−1−w squares if moved vertically or diagonally, 0≤w\u003cn being the \"weakness factor\". For example, a weak queen on a n×n board with a weakness factor of w=1 located in the bottom row will not be able to threaten any square in the top row as the weak queen would need to move n−1 squares vertically or diagonally to get there, but may only move n−2 squares in these directions. In contrast, the weak queen is not handicapped horizontally, thus threatening every square in its own row, independently from its current position in that row.", + "Lets define a weak queen on a n×n board to be a piece which can move any number of squares if moved horizontally, but a maximum of n−1−w squares if moved vertically or diagonally, 0≤weuler535() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18301,7 +18304,7 @@ "type": "bonfire", "title": "Problem 536: Modulo power identity", "tests": [ - "assert.strictEqual(euler536(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler536()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler536(), TODO: MISSING ANSWER, 'message: euler536() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18330,7 +18333,7 @@ "type": "bonfire", "title": "Problem 537: Counting tuples", "tests": [ - "assert.strictEqual(euler537(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler537()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler537(), TODO: MISSING ANSWER, 'message: euler537() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18367,7 +18370,7 @@ "type": "bonfire", "title": "Problem 538: Maximum quadrilaterals", "tests": [ - "assert.strictEqual(euler538(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler538()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler538(), TODO: MISSING ANSWER, 'message: euler538() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18403,7 +18406,7 @@ "type": "bonfire", "title": "Problem 539: Odd elimination", "tests": [ - "assert.strictEqual(euler539(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler539()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler539(), TODO: MISSING ANSWER, 'message: euler539() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18438,7 +18441,7 @@ "type": "bonfire", "title": "Problem 540: Counting primitive Pythagorean triples", "tests": [ - "assert.strictEqual(euler540(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler540()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler540(), TODO: MISSING ANSWER, 'message: euler540() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18453,7 +18456,7 @@ "description": [ "A Pythagorean triple consists of three positive integers $a, b$ and $c$ satisfying $a^2+b^2=c^2$.", "The triple is called primitive if $a, b$ and $c$ are relatively prime.", - "Let P($n$) be the number of primitive Pythagorean triples with $a \u003c b \u003c c \u003c= n$.", + "Let P($n$) be the number of primitive Pythagorean triples with $a < b < c <= n$.", "For example P(20) = 3, since there are three triples: (3,4,5), (5,12,13) and (8,15,17).", "", "", @@ -18467,7 +18470,7 @@ "type": "bonfire", "title": "Problem 541: Divisibility of Harmonic Number Denominators", "tests": [ - "assert.strictEqual(euler541(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler541()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler541(), TODO: MISSING ANSWER, 'message: euler541() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18498,7 +18501,7 @@ "type": "bonfire", "title": "Problem 542: Geometric Progression with Maximum Sum", "tests": [ - "assert.strictEqual(euler542(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler542()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler542(), TODO: MISSING ANSWER, 'message: euler542() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18527,7 +18530,7 @@ "type": "bonfire", "title": "Problem 543: Prime-Sum Numbers", "tests": [ - "assert.strictEqual(euler543(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler543()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler543(), TODO: MISSING ANSWER, 'message: euler543() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18559,7 +18562,7 @@ "type": "bonfire", "title": "Problem 544: Chromatic Conundrum", "tests": [ - "assert.strictEqual(euler544(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler544()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler544(), TODO: MISSING ANSWER, 'message: euler544() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18589,7 +18592,7 @@ "type": "bonfire", "title": "Problem 545: Faulhaber's Formulas", "tests": [ - "assert.strictEqual(euler545(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler545()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler545(), TODO: MISSING ANSWER, 'message: euler545() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18621,7 +18624,7 @@ "type": "bonfire", "title": "Problem 546: The Floor's Revenge", "tests": [ - "assert.strictEqual(euler546(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler546()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler546(), TODO: MISSING ANSWER, 'message: euler546() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18647,7 +18650,7 @@ "type": "bonfire", "title": "Problem 547: Distance of random points within hollow square laminae", "tests": [ - "assert.strictEqual(euler547(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler547()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler547(), TODO: MISSING ANSWER, 'message: euler547() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18687,7 +18690,7 @@ "type": "bonfire", "title": "Problem 548: Gozinta Chains", "tests": [ - "assert.strictEqual(euler548(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler548()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler548(), TODO: MISSING ANSWER, 'message: euler548() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18716,7 +18719,7 @@ "type": "bonfire", "title": "Problem 549: Divisibility of factorials", "tests": [ - "assert.strictEqual(euler549(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler549()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler549(), TODO: MISSING ANSWER, 'message: euler549() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18747,7 +18750,7 @@ "type": "bonfire", "title": "Problem 550: Divisor game", "tests": [ - "assert.strictEqual(euler550(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler550()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler550(), TODO: MISSING ANSWER, 'message: euler550() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18780,7 +18783,7 @@ "type": "bonfire", "title": "Problem 551: Sum of digits sequence", "tests": [ - "assert.strictEqual(euler551(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler551()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler551(), TODO: MISSING ANSWER, 'message: euler551() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18807,7 +18810,7 @@ "type": "bonfire", "title": "Problem 552: Chinese leftovers II", "tests": [ - "assert.strictEqual(euler552(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler552()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler552(), TODO: MISSING ANSWER, 'message: euler552() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18845,7 +18848,7 @@ "type": "bonfire", "title": "Problem 553: Power sets of power sets", "tests": [ - "assert.strictEqual(euler553(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler553()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler553(), TODO: MISSING ANSWER, 'message: euler553() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18885,7 +18888,7 @@ "type": "bonfire", "title": "Problem 554: Centaurs on a chess board", "tests": [ - "assert.strictEqual(euler554(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler554()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler554(), TODO: MISSING ANSWER, 'message: euler554() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18906,7 +18909,7 @@ "Let C(n) be the number of ways to place n2 centaurs on a 2n×2n board so that no centaur attacks another directly.", "For example C(1) = 4, C(2) = 25, C(10) = 1477721.", "", - "Let Fi be the ith Fibonacci number defined as F1 = F2 = 1 and Fi = Fi-1 + Fi-2 for i \u003e 2.", + "Let Fi be the ith Fibonacci number defined as F1 = F2 = 1 and Fi = Fi-1 + Fi-2 for i > 2.", "", "Find $\\displaystyle \\left( \\sum_{i=2}^{90} C(F_i) \\right) \\text{mod } (10^8+7)$." ] @@ -18917,7 +18920,7 @@ "type": "bonfire", "title": "Problem 555: McCarthy 91 function", "tests": [ - "assert.strictEqual(euler555(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler555()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler555(), TODO: MISSING ANSWER, 'message: euler555() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18934,8 +18937,8 @@ "$$", "M_{91}(n) = ", " \\begin{cases}", - " n - 10 \u0026 \\text{if } n \u003e 100 \\\\", - " M_{91}(M_{91}(n+11)) \u0026 \\text{if } 0 \\leq n \\leq 100", + " n - 10 & \\text{if } n > 100 \\\\", + " M_{91}(M_{91}(n+11)) & \\text{if } 0 \\leq n \\leq 100", " \\end{cases}", "$$", "", @@ -18945,8 +18948,8 @@ "$$", "M_{m,k,s}(n) = ", " \\begin{cases}", - " n - s \u0026 \\text{if } n \u003e m \\\\", - " M_{m,k,s}(M_{m,k,s}(n+k)) \u0026 \\text{if } 0 \\leq n \\leq m", + " n - s & \\text{if } n > m \\\\", + " M_{m,k,s}(M_{m,k,s}(n+k)) & \\text{if } 0 \\leq n \\leq m", " \\end{cases}", "$$", "", @@ -18962,7 +18965,7 @@ "For example, the only fixed point of $M_{91}$ is $n = 91$. In other words, $F_{100,11,10}= \\{91\\}$.", " ", "", - "Now, define $SF(m,k,s)$ as the sum of the elements in $F_{m,k,s}$ and let $S(p,m) = \\displaystyle \\sum_{1 \\leq s \u003c k \\leq p}{SF(m,k,s)}$.", + "Now, define $SF(m,k,s)$ as the sum of the elements in $F_{m,k,s}$ and let $S(p,m) = \\displaystyle \\sum_{1 \\leq s < k \\leq p}{SF(m,k,s)}$.", "", "", "For example, $S(10, 10) = 225$ and $S(1000, 1000)=208724467$.", @@ -18977,7 +18980,7 @@ "type": "bonfire", "title": "Problem 556: Squarefree Gaussian Integers", "tests": [ - "assert.strictEqual(euler556(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler556()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler556(), TODO: MISSING ANSWER, 'message: euler556() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -18994,7 +18997,7 @@ "Gaussian integers are a subset of the complex numbers, and the integers are the subset of Gaussian integers for which b = 0.", "", "A Gaussian integer unit is one for which a2 + b2 = 1, i.e. one of 1, i, -1, -i.", - "Let's define a proper Gaussian integer as one for which a \u003e 0 and b ≥ 0.", + "Let's define a proper Gaussian integer as one for which a > 0 and b ≥ 0.", "", "A Gaussian integer z1 = a1 + b1i is said to be divisible by z2 = a2 + b2i if z3 = a3 + b3i = z1/z2 is a Gaussian integer.", "$\\frac {z_1} {z_2} = \\frac {a_1 + b_1 i} {a_2 + b_2 i} = \\frac {(a_1 + b_1 i)(a_2 - b_2 i)} {(a_2 + b_2 i)(a_2 - b_2 i)} = \\frac {a_1 a_2 + b_1 b_2} {a_2^2 + b_2^2} + \\frac {a_2 b_1 - a_1 b_2} {a_2^2 + b_2^2}i = a_3 + b_3 i$", @@ -19024,7 +19027,7 @@ "type": "bonfire", "title": "Problem 557: Cutting triangles", "tests": [ - "assert.strictEqual(euler557(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler557()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler557(), TODO: MISSING ANSWER, 'message: euler557() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19058,7 +19061,7 @@ "type": "bonfire", "title": "Problem 558: Irrational base", "tests": [ - "assert.strictEqual(euler558(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler558()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler558(), TODO: MISSING ANSWER, 'message: euler558() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19094,7 +19097,7 @@ "type": "bonfire", "title": "Problem 559: Permuted Matrices", "tests": [ - "assert.strictEqual(euler559(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler559()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler559(), TODO: MISSING ANSWER, 'message: euler559() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19112,7 +19115,7 @@ "Let P(k, r, n) be the number of r x n matrices with the following properties:", "", "The rows are permutations of {1, 2, 3, ... , n}.", - " Numbering the first column as 1, a column ascent occurs at column j\u003cn if and only if j is not a multiple of k.", + " Numbering the first column as 1, a column ascent occurs at column jeuler560() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19157,7 +19160,7 @@ "type": "bonfire", "title": "Problem 561: Divisor Pairs", "tests": [ - "assert.strictEqual(euler561(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler561()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler561(), TODO: MISSING ANSWER, 'message: euler561() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19188,7 +19191,7 @@ "type": "bonfire", "title": "Problem 562: Maximal perimeter", "tests": [ - "assert.strictEqual(euler562(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler562()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler562(), TODO: MISSING ANSWER, 'message: euler562() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19217,7 +19220,7 @@ "type": "bonfire", "title": "Problem 563: Robot Welders", "tests": [ - "assert.strictEqual(euler563(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler563()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler563(), TODO: MISSING ANSWER, 'message: euler563() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19247,7 +19250,7 @@ "type": "bonfire", "title": "Problem 564: Maximal polygons", "tests": [ - "assert.strictEqual(euler564(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler564()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler564(), TODO: MISSING ANSWER, 'message: euler564() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19278,7 +19281,7 @@ "type": "bonfire", "title": "Problem 565: Divisibility of sum of divisors", "tests": [ - "assert.strictEqual(euler565(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler565()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler565(), TODO: MISSING ANSWER, 'message: euler565() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19315,7 +19318,7 @@ "type": "bonfire", "title": "Problem 566: Cake Icing Puzzle", "tests": [ - "assert.strictEqual(euler566(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler566()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler566(), TODO: MISSING ANSWER, 'message: euler566() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19341,7 +19344,7 @@ "", "", "Let F(a, b, c) be the minimum number of piece flips needed to get all the icing back on top for pieces of size $x=\\frac{360}{a}$ degrees, $y=\\frac{360}{b}$ degrees and $z=\\frac{360}{\\sqrt{c}}$ degrees.", - "Let $G(n) = \\sum_{9 \\le a \u003c b \u003c c \\le n} F(a,b,c)$, for integers a, b and c.", + "Let $G(n) = \\sum_{9 \\le a < b < c \\le n} F(a,b,c)$, for integers a, b and c.", "", "You are given that F(9, 10, 11) = 60, F(10, 14, 16) = 506, F(15, 16, 17) = 785232.", "You are also given G(11) = 60, G(14) = 58020 and G(17) = 1269260.", @@ -19355,7 +19358,7 @@ "type": "bonfire", "title": "Problem 567: Reciprocal games I", "tests": [ - "assert.strictEqual(euler567(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler567()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler567(), TODO: MISSING ANSWER, 'message: euler567() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19388,7 +19391,7 @@ "type": "bonfire", "title": "Problem 568: Reciprocal games II", "tests": [ - "assert.strictEqual(euler568(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler568()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler568(), TODO: MISSING ANSWER, 'message: euler568() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19422,7 +19425,7 @@ "type": "bonfire", "title": "Problem 569: Prime Mountain Range", "tests": [ - "assert.strictEqual(euler569(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler569()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler569(), TODO: MISSING ANSWER, 'message: euler569() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19454,7 +19457,7 @@ "type": "bonfire", "title": "Problem 570: Snowflakes", "tests": [ - "assert.strictEqual(euler570(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler570()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler570(), TODO: MISSING ANSWER, 'message: euler570() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19492,7 +19495,7 @@ "type": "bonfire", "title": "Problem 571: Super Pandigital Numbers", "tests": [ - "assert.strictEqual(euler571(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler571()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler571(), TODO: MISSING ANSWER, 'message: euler571() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19521,7 +19524,7 @@ "type": "bonfire", "title": "Problem 572: Idempotent matrices", "tests": [ - "assert.strictEqual(euler572(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler572()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler572(), TODO: MISSING ANSWER, 'message: euler572() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19537,9 +19540,9 @@ "A matrix $M$ is called idempotent if $M^2 = M$.", "Let $M$ be a three by three matrix : ", "$M=\\begin{pmatrix} ", - " a \u0026 b \u0026 c\\\\ ", - " d \u0026 e \u0026 f\\\\", - " g \u0026h \u0026i\\\\", + " a & b & c\\\\ ", + " d & e & f\\\\", + " g &h &i\\\\", "\\end{pmatrix}$.", "Let C(n) be the number of idempotent three by three matrices $M$ with integer elements such that", "$ -n \\le a,b,c,d,e,f,g,h,i \\le n$.", @@ -19556,7 +19559,7 @@ "type": "bonfire", "title": "Problem 573: Unfair race", "tests": [ - "assert.strictEqual(euler573(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler573()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler573(), TODO: MISSING ANSWER, 'message: euler573() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19587,7 +19590,7 @@ "type": "bonfire", "title": "Problem 574: Verifying Primes", "tests": [ - "assert.strictEqual(euler574(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler574()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler574(), TODO: MISSING ANSWER, 'message: euler574() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19600,18 +19603,18 @@ "euler574();" ], "description": [ - "Let $q$ be a prime and $A \\ge B \u003e0$ be two integers with the following properties:", + "Let $q$ be a prime and $A \\ge B >0$ be two integers with the following properties:", " $A$ and $B$ have no prime factor in common, that is $\\text{gcd}(A,B)=1$.", " The product $AB$ is divisible by every prime less than q.", "", - "It can be shown that, given these conditions, any sum $A+B\u003cq^2$ and any difference $1\u003cA-B\u003cq^2$ has to be a prime number. Thus you can verify that a number $p$ is prime by showing that either $p=A+B\u003cq^2$ or $p=A-B\u003cq^2$ for some $A,B,q$ fulfilling the conditions listed above.", + "It can be shown that, given these conditions, any sum $A+Beuler575() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19667,7 +19670,7 @@ "type": "bonfire", "title": "Problem 576: Irrational jumps", "tests": [ - "assert.strictEqual(euler576(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler576()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler576(), TODO: MISSING ANSWER, 'message: euler576() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19680,7 +19683,7 @@ "euler576();" ], "description": [ - "A bouncing point moves counterclockwise along a circle with circumference $1$ with jumps of constant length $l\u003c1$, until it hits a gap of length $g\u003c1$, that is placed in a distance $d$ counterclockwise from the starting point. The gap does not include the starting point, that is $g+d\u003c1$.", + "A bouncing point moves counterclockwise along a circle with circumference $1$ with jumps of constant length $l<1$, until it hits a gap of length $g<1$, that is placed in a distance $d$ counterclockwise from the starting point. The gap does not include the starting point, that is $g+d<1$.", "", "Let $S(l,g,d)$ be the sum of the length of all jumps, until the point falls into the gap. It can be shown that $S(l,g,d)$ is finite for any irrational jump size $l$, regardless of the values of $g$ and $d$.", "Examples: ", @@ -19700,7 +19703,7 @@ "type": "bonfire", "title": "Problem 577: Counting hexagons", "tests": [ - "assert.strictEqual(euler577(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler577()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler577(), TODO: MISSING ANSWER, 'message: euler577() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19731,7 +19734,7 @@ "type": "bonfire", "title": "Problem 578: Integers with decreasing prime powers", "tests": [ - "assert.strictEqual(euler578(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler578()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler578(), TODO: MISSING ANSWER, 'message: euler578() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19745,9 +19748,9 @@ ], "description": [ "Any positive integer can be written as a product of prime powers: p1a1 × p2a2 × ... × pkak,", - "where pi are distinct prime integers, ai \u003e 0 and pi \u003c pj if i \u003c j.", + "where pi are distinct prime integers, ai > 0 and pi < pj if i < j.", "", - "A decreasing prime power positive integer is one for which ai ≥ aj if i \u003c j.", + "A decreasing prime power positive integer is one for which ai ≥ aj if i < j.", "For example, 1, 2, 15=3×5, 360=23×32×5 and 1000=23×53 are decreasing prime power integers.", "", "Let C(n) be the count of decreasing prime power positive integers not exceeding n.", @@ -19763,7 +19766,7 @@ "type": "bonfire", "title": "Problem 579: Lattice points in lattice cubes", "tests": [ - "assert.strictEqual(euler579(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler579()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler579(), TODO: MISSING ANSWER, 'message: euler579() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19800,7 +19803,7 @@ "type": "bonfire", "title": "Problem 580: Squarefree Hilbert numbers", "tests": [ - "assert.strictEqual(euler580(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler580()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler580(), TODO: MISSING ANSWER, 'message: euler580() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19826,7 +19829,7 @@ "type": "bonfire", "title": "Problem 581: 47-smooth triangular numbers", "tests": [ - "assert.strictEqual(euler581(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler581()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler581(), TODO: MISSING ANSWER, 'message: euler581() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19850,7 +19853,7 @@ "type": "bonfire", "title": "Problem 582: Nearly isosceles 120 degree triangles", "tests": [ - "assert.strictEqual(euler582(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler582()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler582(), TODO: MISSING ANSWER, 'message: euler582() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19875,7 +19878,7 @@ "type": "bonfire", "title": "Problem 583: Heron Envelopes", "tests": [ - "assert.strictEqual(euler583(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler583()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler583(), TODO: MISSING ANSWER, 'message: euler583() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19911,7 +19914,7 @@ "type": "bonfire", "title": "Problem 584: Birthday Problem Revisited", "tests": [ - "assert.strictEqual(euler584(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler584()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler584(), TODO: MISSING ANSWER, 'message: euler584() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19951,7 +19954,7 @@ "type": "bonfire", "title": "Problem 585: Nested square roots", "tests": [ - "assert.strictEqual(euler585(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler585()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler585(), TODO: MISSING ANSWER, 'message: euler585() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -19973,7 +19976,7 @@ "$\\small \\sqrt{28+\\sqrt{160}+\\sqrt{108}}=\\sqrt{15}+\\sqrt{6}+\\sqrt{5}-\\sqrt{2}$", "As you can see the integers used in the denested expression may also be perfect squares resulting in further simplification.", "", - "Let F($n$) be the number of different terms $\\small \\sqrt{x+\\sqrt{y}+\\sqrt{z}}$, that can be denested into the sum and/or difference of a finite number of square roots, given the additional condition that $0\u003cx \\le n$. That is,", + "Let F($n$) be the number of different terms $\\small \\sqrt{x+\\sqrt{y}+\\sqrt{z}}$, that can be denested into the sum and/or difference of a finite number of square roots, given the additional condition that $0euler586() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20009,7 +20012,7 @@ "$ \\qquad 209 = 13^2 + 3\\cdot13\\cdot 1 + 1^2$", "", "", - "Let $f(n,r)$ be the number of integers $k$ not exceeding $n$ that can be expressed as $k=a^2 + 3ab + b^2$, with $a\\gt b\u003e0$ integers, in exactly $r$ different ways.", + "Let $f(n,r)$ be the number of integers $k$ not exceeding $n$ that can be expressed as $k=a^2 + 3ab + b^2$, with $a\\gt b>0$ integers, in exactly $r$ different ways.", "", "", "You are given that $f(10^5, 4) = 237$ and $f(10^8, 6) = 59517$.", @@ -20024,7 +20027,7 @@ "type": "bonfire", "title": "Problem 587: Concave triangle", "tests": [ - "assert.strictEqual(euler587(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler587()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler587(), TODO: MISSING ANSWER, 'message: euler587() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20069,7 +20072,7 @@ "type": "bonfire", "title": "Problem 588: Quintinomial coefficients", "tests": [ - "assert.strictEqual(euler588(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler588()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler588(), TODO: MISSING ANSWER, 'message: euler588() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20106,7 +20109,7 @@ "type": "bonfire", "title": "Problem 589: Poohsticks Marathon", "tests": [ - "assert.strictEqual(euler589(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler589()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler589(), TODO: MISSING ANSWER, 'message: euler589() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20143,7 +20146,7 @@ "type": "bonfire", "title": "Problem 590: Sets with a given Least Common Multiple", "tests": [ - "assert.strictEqual(euler590(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler590()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler590(), TODO: MISSING ANSWER, 'message: euler590() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20180,7 +20183,7 @@ "type": "bonfire", "title": "Problem 591: Best Approximations by Quadratic Integers", "tests": [ - "assert.strictEqual(euler591(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler591()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler591(), TODO: MISSING ANSWER, 'message: euler591() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20194,7 +20197,7 @@ ], "description": [ "Given a non-square integer $d$, any real $x$ can be approximated arbitrarily close by quadratic integers $a+b\\sqrt{d}$, where $a,b$ are integers. For example, the following inequalities approximate $\\pi$ with precision $10^{-13}$:", - "$$4375636191520\\sqrt{2}-6188084046055 \u003c \\pi \u003c 721133315582\\sqrt{2}-1019836515172 $$ ", + "$$4375636191520\\sqrt{2}-6188084046055 < \\pi < 721133315582\\sqrt{2}-1019836515172 $$ ", "We call $BQA_d(x,n)$ the quadratic integer closest to $x$ with the absolute values of $a,b$ not exceeding $n$. We also define the integral part of a quadratic integer as $I_d(a+b\\sqrt{d}) = a$.", "", "You are given that:", @@ -20210,7 +20213,7 @@ "type": "bonfire", "title": "Problem 592: Factorial trailing digits 2", "tests": [ - "assert.strictEqual(euler592(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler592()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler592(), TODO: MISSING ANSWER, 'message: euler592() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20237,7 +20240,7 @@ "type": "bonfire", "title": "Problem 593: Fleeting Medians", "tests": [ - "assert.strictEqual(euler593(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler593()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler593(), TODO: MISSING ANSWER, 'message: euler593() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20269,7 +20272,7 @@ "type": "bonfire", "title": "Problem 594: Rhombus Tilings", "tests": [ - "assert.strictEqual(euler594(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler594()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler594(), TODO: MISSING ANSWER, 'message: euler594() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20310,7 +20313,7 @@ "type": "bonfire", "title": "Problem 595: Incremental Random Sort", "tests": [ - "assert.strictEqual(euler595(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler595()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler595(), TODO: MISSING ANSWER, 'message: euler595() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20343,7 +20346,7 @@ "type": "bonfire", "title": "Problem 596: Number of lattice points in a hyperball", "tests": [ - "assert.strictEqual(euler596(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler596()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler596(), TODO: MISSING ANSWER, 'message: euler596() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20369,7 +20372,7 @@ "type": "bonfire", "title": "Problem 597: Torpids", "tests": [ - "assert.strictEqual(euler597(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler597()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler597(), TODO: MISSING ANSWER, 'message: euler597() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20452,7 +20455,7 @@ "type": "bonfire", "title": "Problem 598: Split Divisibilities", "tests": [ - "assert.strictEqual(euler598(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler598()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler598(), TODO: MISSING ANSWER, 'message: euler598() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20484,7 +20487,7 @@ "type": "bonfire", "title": "Problem 599: Distinct Colourings of a Rubik's Cube", "tests": [ - "assert.strictEqual(euler599(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler599()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler599(), TODO: MISSING ANSWER, 'message: euler599() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20518,7 +20521,7 @@ "type": "bonfire", "title": "Problem 600: Integer sided equiangular hexagons", "tests": [ - "assert.strictEqual(euler600(), TODO: MISSING ANSWER, 'message: \u003ccode\u003eeuler600()\u003c/code\u003e should return TODO: MISSING ANSWER.');" + "assert.strictEqual(euler600(), TODO: MISSING ANSWER, 'message: euler600() should return TODO: MISSING ANSWER.');" ], "solutions": [], "translations": {}, @@ -20542,4 +20545,4 @@ ] } ] -} +} \ No newline at end of file