Den of obliquity
/.
The oblique adverb in the form f/.y applies f along the oblique lines on the angle (/) of an array. The most obvious application for this adverb is the summing of the oblique lines of the times table of two lists representing polynomial coefficient. For example, if p=.1 2 1 and q=.1 3 3 1 , then the times table ]t=.p*/q 1 3 3 1 2 6 6 2 1 3 3 1 may be summed along the oblique by +//.t 1 5 10 10 5 1 The obliques are 1, 3 2, 3 6 1, 1 6 3, 2 3, 1 . Two further uses of oblique are given in the following: b=.+//.@,:~ NB. sum obliquely self-laminated argument q=.,1 b q 1 1 b b q 1 2 1 ]w=.b^:(i.8)q 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 2 1 0 0 0 0 0 1 3 3 1 0 0 0 0 1 4 6 4 1 0 0 0 1 5 10 10 5 1 0 0 1 6 15 20 15 6 1 0 1 7 21 35 35 21 7 1 You may know that the row sums are powers of 2 , but what are the oblique sums? (Only the first 8 are complete). 8{.+//.w 1 1 2 3 5 8 13 21 This suggests the following Fibonacci number verbs: FibNo=.(+/ .!|.)@i."0 NB. Never-before-seen inner product FibNo i.13 0 1 1 2 3 5 8 13 21 34 55 89 144 |