3 ms·
Explanation: 1. sin(pi/p) is non-zero for any prime p since 1/p is not an integer. Thus the product is non-zero. 2. Since sin has period 2pi and product(p')/
by paulddraper 10y ago
Explanation:
1. sin(pi/p) is non-zero for any prime p since 1/p is not an integer.
Thus the product is non-zero.
2. Since sin has period 2pi and product(p')/p is an integer,
sin(pi/p) = sin(pi/p + 2pi*product(p')/p) = sin((1 + 2product(p'))pi/p)
All integers over two are divisible by some prime so (1 + 2product(p'))/p is an integer for some p, and the sin is 0.
Since one of the terms is zero, the product is zero.
---
As bonoboTP, points out, this is simply encoding logic into math functions.
* TRUE is non-zero; FALSE is zero.
* AND is product.
* N IS INTEGER is sin(n * pi).
Note that I think 0 != to be semantically simpler than 0 <.