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.
 
GeneratingStarting a series ofwith numbers which end in 269696, and filtering for those withwhich have integer roots:
 
{{works with|ES6}}