|
|
A345220
|
|
Number of divisors of n with an even number of primes not exceeding them.
|
|
1
|
|
|
1, 1, 2, 2, 1, 2, 2, 3, 3, 2, 1, 3, 2, 3, 3, 4, 1, 3, 2, 4, 4, 2, 1, 4, 1, 2, 3, 4, 2, 5, 1, 4, 2, 1, 2, 4, 2, 3, 4, 6, 1, 5, 2, 4, 5, 2, 1, 5, 2, 2, 2, 3, 2, 4, 2, 6, 4, 3, 1, 7, 2, 2, 6, 5, 3, 4, 1, 2, 2, 4, 2, 6, 1, 2, 3, 4, 2, 4, 2, 8, 4, 2, 1, 6, 1, 2, 3, 5, 2, 8, 4, 4, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{d|n} ((pi(d)+1) mod 2).
|
|
EXAMPLE
|
a(24) = 4; The divisors d of 24 are: 1, 2, 3, 4, 6, 8, 12, 24 and the corresponding values of pi(d) are: 0, 1, 2, 2, 3, 4, 5, 9. There are 4 even values of pi(d).
|
|
MATHEMATICA
|
Table[Sum[Mod[PrimePi[k] + 1, 2] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
|
|
PROG
|
(PARI) a(n) = sumdiv(n, d, !(primepi(d) % 2)); \\ Michel Marcus, Jun 11 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|