Smallest square that begins with n: Difference between revisions

Content added Content deleted
Line 2,313: Line 2,313:
showList(NumSqrList).
showList(NumSqrList).
</syntaxhighlight>
</syntaxhighlight>
{{out}}
<pre>
?- time(do).
1 -> 1 2 -> 25 3 -> 36 4 -> 4 5 -> 529 6 -> 64 7 -> 729
8 -> 81 9 -> 9 10 -> 100 11 -> 1156 12 -> 121 13 -> 1369 14 -> 144
15 -> 1521 16 -> 16 17 -> 1764 18 -> 1849 19 -> 196 20 -> 2025 21 -> 2116
22 -> 225 23 -> 2304 24 -> 2401 25 -> 25 26 -> 2601 27 -> 2704 28 -> 289
29 -> 2916 30 -> 3025 31 -> 3136 32 -> 324 33 -> 3364 34 -> 3481 35 -> 35344
36 -> 36 37 -> 3721 38 -> 3844 39 -> 3969 40 -> 400 41 -> 41209 42 -> 4225
43 -> 4356 44 -> 441 45 -> 45369 46 -> 4624 47 -> 4761 48 -> 484 49 -> 49
% 10,519 inferences, 0.003 CPU in 0.003 seconds (99% CPU, 3934947 Lips)
true.
</pre>


=={{header|Python}}==
=={{header|Python}}==