[Jprogramming] arithmetic sequence
alessandro codenotti
code95 at live.it
Thu Dec 20 14:43:24 UTC 2012
The answer expected is exactly the one provided by Henry's code which, for the first 10 terms, just copy/pasting from the J console, is:
next=.5&(0 3 + *)
(i. 10) next 1 0
1 0
5 3
25 18
125 93
625 468
3125 2343
15625 11718
78125 58593
390625 292968
1953125 1464843
What I'm now speaking about is only how to improve this code, since it seems wasting a huge amount of time too me, though I'm not sure about it, being a beginner in J!
Alessandro
More information about the Programming
mailing list