Find square difference: Difference between revisions
m
→{{header|J}}
(J) |
m (→{{header|J}}) |
||
Line 353:
Through inspection, we can see that the "square difference' for a number <code>n</code> is <code>(2*n)-1</code>:
<syntaxhighlight lang=J> (*: - *:&<:) 1 2 3 4 5
1 3 5 7 9</
Therefore, we expect that n=501 would give us a "square difference' of 1001. Testing, we can see that this is the case:
|