This question is off-topic as it appears to be a mathematics problem, as opposed to a mathematical puzzle. For more info, see "Are math-textbook-style problems on topic?""Are math-textbook-style problems on topic?" on meta.
replaced http://meta.puzzling.stackexchange.com/ with https://puzzling.meta.stackexchange.com/
replaced http://meta.puzzling.stackexchange.com/ with https://puzzling.meta.stackexchange.com/