blob: 53dcf1843db190d92c6873d5da4294e7e7697b7f (
plain)
1
2
3
4
5
|
#!/bin/sh
# For every divisor of N, its state is flipped. Thus, starting at zero,
# all numbers having an odd number of divisors end in state one.
perl -MMath::Prime::Util=:all -E 'divisor_sum($_,0) % 2 and say for 1 .. 500'
|