Numbers whose count of divisors is prime: Difference between revisions

→‎{{header|Go}}: Takes account of Horsth's observation that only square numbers need to be tested.
(→‎{{header|Wren}}: Takes account of Horsth's observation that only square numbers need to be tested.)
(→‎{{header|Go}}: Takes account of Horsth's observation that only square numbers need to be tested.)
Line 166:
const limit = 1e5
var results []int
for i := 32; i * i < limit; i++ {
n := countDivisors(i * i)
if n > 2 && rcu.IsPrime(n) {
results = append(results, i * i)
}
}
9,486

edits