Achilles numbers: Difference between revisions
Content added Content deleted
m (→{{header|ALGOL 68}}: Indulged my OCD comment delimiter lining up thing...) |
|||
Line 51: | Line 51: | ||
{{works with|ALGOL 68G|Any - tested with release 2.8.3.win32}} |
{{works with|ALGOL 68G|Any - tested with release 2.8.3.win32}} |
||
{{libheader|ALGOL 68-primes}} |
{{libheader|ALGOL 68-primes}} |
||
<lang algol68>BEGIN # find Achilles Numbers: numbers whose prime factors p appear at least |
<lang algol68>BEGIN # find Achilles Numbers: numbers whose prime factors p appear at least # |
||
# twice (i.e. if p is a prime factor, so is p^2) and cannot be # |
# twice (i.e. if p is a prime factor, so is p^2) and cannot be # |
||
# expressed as m^k for any integer m, k > 1 # |
# expressed as m^k for any integer m, k > 1 # |
||
# also find strong Achilles Numbers: |
# also find strong Achilles Numbers: Achilles Numbers where the Euler's # |
||
# totient of the number is also Achilles # |
# totient of the number is also Achilles # |
||
# returns the number of integers k where 1 <= k <= n that are mutually # |
# returns the number of integers k where 1 <= k <= n that are mutually # |