Numbers which are not the sum of distinct squares: Difference between revisions
Numbers which are not the sum of distinct squares (view source)
Revision as of 22:24, 23 November 2021
, 2 years ago→{{header|Raku}}: clarify slightly
Thundergnat (talk | contribs) m (→{{header|Raku}}: more concise) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: clarify slightly) |
||
Line 38:
'''Spoiler:''' ''(highlight to read)''<br>
<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
|