O'Halloran numbers: Difference between revisions

m (→‎{{header|J}}: slightly cleaner)
Line 63:
=={{header|J}}==
<syntaxhighlight lang=J> require'stats'
2*(3}.i.501)-.+/1 */\.(|:3 comb 50242)-i:1
8 12 20 36 44 60 84 116 140 156 204 260 380 420 660 924</syntaxhighlight>
 
Here, we use [[Combinations_with_repetitions#J|combinations with repetitions]] to generate the various relevant cuboid side lengths. Then we multiply all three pairs of these side length combinations and sum the pairs. Then we remove these sums from the sequence 3..500, and finally we multiply the remaining 16 values by 2.
 
=={{header|Julia}}==
6,962

edits