A329717 a(n) is n (plus or minus) the number of distinct primes dividing n according to parity (even or odd).
1, 1, 2, 3, 4, 8, 6, 7, 8, 12, 10, 14, 12, 16, 17, 15, 16, 20, 18, 22, 23, 24, 22, 26, 24, 28, 26, 30, 28, 27, 30, 31, 35, 36, 37, 38, 36, 40, 41, 42, 40, 39, 42, 46, 47, 48, 46, 50, 48, 52, 53, 54, 52, 56, 57, 58, 59, 60, 58, 57, 60, 64, 65, 63, 67, 63, 66
Offset: 1
Keywords
Examples
A001221(3) = 1, so a(3) = 3-1 = 2. A001221(6) = 2, so a(6) = 6+2 = 8.
Links
- Lars Blomberg, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Array[# + (om = PrimeNu[#]) * (-1)^om &, 67] (* Amiram Eldar, Nov 23 2019 *)
-
PARI
a(n) = my(om=omega(n)); n + (-1)^om*om; \\ Michel Marcus, Nov 20 2019