Frobenius numbers: Difference between revisions

Content added Content deleted
(Added AutoHotkey)
Line 845: Line 845:
<lang J>frob =: (*&p: - +&p:) >:
<lang J>frob =: (*&p: - +&p:) >:
echo frob i. 25</lang>
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}}
{{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>
<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>