Blum integer: Difference between revisions

Content added Content deleted
(→‎{{header|ALGOL 68}}: correct comment)
(Corrected the format to display the distribution.)
Line 566: Line 566:
echo "\n% distribution of the first 400_000 Blum integers:"
echo "\n% distribution of the first 400_000 Blum integers:"
for i in [1, 3, 7, 9]:
for i in [1, 3, 7, 9]:
echo &" {counts[i]/4000:6.5} % end in {i}"
echo &" {counts[i]/4000:6.3f} % end in {i}"
break
break
n = if n mod 5 == 3: n + 4 else: n + 2
n = if n mod 5 == 3: n + 4 else: n + 2