J is an array language after all, so
/:~>;(3 : '<@(a:-.~<@('' ''-.~ y(''''"_`]@.(e.~{.))
+/,#)\.)\*:i.>.%:>./y')2019+i:50
1969 11
1985 2
2010 5
2018 12
2025 1
2030 3
2030 4
2051 7
2054 13
R.E. Boss
> -----Oorspronkelijk bericht-----
> Van: Programming <[email protected]>
> Namens R.E. Boss
> Verzonden: donderdag 24 oktober 2019 21:29
> Aan: [email protected]
> Onderwerp: Re: [Jprogramming] Quora problem
>
> ;(<@(''"_`# @.(2018=+/))\.)\2^~i.>.%:2018
> 12
>
>
> R.E. Boss
>
>
> > -----Oorspronkelijk bericht-----
> > Van: Programming <[email protected]>
> > Namens R.E. Boss
> > Verzonden: donderdag 24 oktober 2019 19:30
> > Aan: [email protected]
> > Onderwerp: Re: [Jprogramming] Quora problem
> >
> > 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 <[email protected]>
> > > Namens Skip Cave
> > > Verzonden: donderdag 24 oktober 2019 19:12
> > > Aan: [email protected]
> > > 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
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm