Numbers which are not the sum of distinct squares: Difference between revisions

Content added Content deleted
m (→‎{{header|Raku}}: more concise)
m (→‎{{header|Raku}}: clarify slightly)
Line 38: Line 38:


'''Spoiler:''' ''(highlight to read)''<br>
'''Spoiler:''' ''(highlight to read)''<br>
<span style="foreground-color:black;background-color:black;">Once the longest run of generated sums is longer the the next square, every number after can be generated by adding the next square to every number in the run. Find the ''new'' longest run, add the ''next'' square, etc.<span>
<span style="foreground-color:black;background-color:black;">Once the longest run of consecutive generated sums is longer the the next square, every number after can be generated by adding the next square to every number in the run. Find the ''new'' longest run, add the ''next'' square, etc.<span>
<lang perl6>my @squares = ^∞ .map: *²; # Infinite series of squares
<lang perl6>my @squares = ^∞ .map: *²; # Infinite series of squares