O'Halloran numbers: Difference between revisions

Content added Content deleted
m (→‎{{header|Raku}}: not quite as far overboard)
(→‎{{header|J}}: document the approach)
Line 33: Line 33:
2*(3}.i.501)-.+/1 */\.(|:3 comb 502)+-.i.3
2*(3}.i.501)-.+/1 */\.(|:3 comb 502)+-.i.3
8 12 20 36 44 60 84 116 140 156 204 260 380 420 660 924</syntaxhighlight>
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 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|Raku}}==
=={{header|Raku}}==
<syntaxhighlight lang="raku" line>my @Area;
<syntaxhighlight lang="raku" line>my @Area;