4 ms·
nah its pretty straightforward w/ higher order fns. one of many possible solutions: {(1○⍺)>2○⍵} {(⍹ ⍵)/⍨⍵ ⍶ ⍹ ⍵} {⍵*2} {⍵/⍨2|⍵}⍳50 1 9 49 225 36
by gandercrews 6y ago
nah its pretty straightforward w/ higher order fns.
one of many possible solutions:
{(1○⍺)>2○⍵} {(⍹ ⍵)/⍨⍵ ⍶ ⍹ ⍵} {⍵*2} {⍵/⍨2|⍵}⍳50
1 9 49 225 361 441 625 1089 1521 1681 2025 2209
- eesmith 6y agoOh, sorry, I was too clever by half. I should have been more specific - hard to pull off in Panda. Thanks for an APL solution in any case!