Babbage problem: Difference between revisions

Content deleted Content added
Hout (talk | contribs)
Hout (talk | contribs)
Line 1,013:
JavaScript's Array constructor lets us filter an array automatically populated with a function of the element index. This proves faster than setting up and running a while loop test, and we can make it particularly efficient by testing the potential squares rather than the potential roots.
 
Starting with numbers which end in 269696, and filtering for those which have integer roots:, so that we reach '''25264 ^2 -> 638269696''' after only 638 tests.
 
{{works with|ES6}}