A gozinta chain for n is a sequence {1,a,b,...,n} where each element properly divides the next.
There are eight gozinta chains for 12:
{1,12} ,{1,2,12}, {1,2,4,12}, {1,2,6,12}, {1,3,12}, {1,3,6,12}, {1,4,12} and {1,6,12}.
Let g(n) be the number of gozinta chains for n, so g(12)=8.
g(48)=48 and g(120)=132.
Given n, return the number of gozinta chains for g(n).
(Adapted from Project Euler, problem #548)
const g = (n) => {
return "Good luck!"
}
// Test.assertEquals(actual, expected, [optional] message)
// Test.assertNotEquals(actual, expected, [optional] message)
describe("Gozinta-fy", function(){
it("should solve the test problems", function(){
Test.assertEquals(g(12), 8);
});
it("should solve the test problems", function(){
Test.assertEquals(g(48), 48);
});
it("should solve the test problems", function(){
Test.assertEquals(g(120), 132);
});
});