Obviously the squares >2018 don't play any role whatsoever, so you can restrict 
yourself to %:2018

   >a#~2018=>+/ each a=.;<@(<\.)\2^~i.>.%:2018
49 64 81 100 121 144 169 196 225 256 289 324

R.E. Boss


> -----Oorspronkelijk bericht-----
> Van: Programming <programming-boun...@forums.jsoftware.com>
> Namens Skip Cave
> Verzonden: donderdag 24 oktober 2019 19:12
> Aan: programm...@jsoftware.com
> Onderwerp: Re: [Jprogramming] Quora problem
> 
> To me it seems that R. E. Boss provided the simplest approach.
> Don't know about efficiency, but the results appear instantly:
> 
> >a#~2018=>+/ each a=.;<@(<\.)\2^~i.100
> 
> 49 64 81 100 121 144 169 196 225 256 289 324
> 
> Skip
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to