3 ms·
Sorry, the APL program is only 26 characters: +/1 ¯4 4 8×[2](⍳9)∘.*¯1+⍳4 And outputs: 9 73 241 561 1081 1849 2913 4321 6121
by jcl 17y ago
Sorry, the APL program is only 26 characters:
+/1 ¯4 4 8×[2](⍳9)∘.*¯1+⍳4
And outputs:
9 73 241 561 1081 1849 2913 4321 6121