We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Ah sorry I should clarify that the sequence I mentioned begins indexing at 0. The way I did it was with a simple program that performed a partial sum up to say the 1000th term since it converges. However this is just a geometric series: S = 1/4 + 1/16 + 1/64 + ... Dividing both sides by 4 you get S/4 = 1/16 + 1/64 + ... Subtracting the two equations you get 3S/4 = 1/4 or S = 1/3
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #232: The Race
You are viewing a single comment's thread. Return to all comments →
Ah sorry I should clarify that the sequence I mentioned begins indexing at 0. The way I did it was with a simple program that performed a partial sum up to say the 1000th term since it converges. However this is just a geometric series: S = 1/4 + 1/16 + 1/64 + ... Dividing both sides by 4 you get S/4 = 1/16 + 1/64 + ... Subtracting the two equations you get 3S/4 = 1/4 or S = 1/3