Frobenius numbers: Difference between revisions
m
→{{header|J}}
Alpha bravo (talk | contribs) (Added AutoHotkey) |
m (→{{header|J}}) |
||
Line 845:
<lang J>frob =: (*&p: - +&p:) >:
echo frob i. 25</lang>
(Note that <code>frob</code> counts prime numbers starting from 0 (which gives 2), so for some contexts the function to calculate frobenius numbers would be <code>frob@<:</code>.)
{{out}}
<pre>1 7 23 59 119 191 287 395 615 839 1079 1439 1679 1931 2391 3015 3479 3959 4619 5039 5615 6395 7215 8447 9599</pre>
|