Appearance
TIP
有一个数 3n,求 ⩽3n 且与 3n 互为质数的个数:
先求与 3n 不互为质数的个数:
1×3,2×3,3×3,...,3n−1⋅3,总共有 3n−1 个数与 3n 不互为质数。
那么与 3n 互为质数的个数:3n−3n−1=2⋅3n−1