|
|
A183063
|
|
Number of even divisors of n.
|
|
59
|
|
|
0, 1, 0, 2, 0, 2, 0, 3, 0, 2, 0, 4, 0, 2, 0, 4, 0, 3, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 4, 0, 5, 0, 2, 0, 6, 0, 2, 0, 6, 0, 4, 0, 4, 0, 2, 0, 8, 0, 3, 0, 4, 0, 4, 0, 6, 0, 2, 0, 8, 0, 2, 0, 6, 0, 4, 0, 4, 0, 4, 0, 9, 0, 2, 0, 4, 0, 4, 0, 8, 0, 2, 0, 8, 0, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Number of divisors of n that are divisible by 2. More generally, it appears that the sequence formed by starting with an initial set of k-1 zeros followed by the members of A000005, with k-1 zeros between every one of them, can be defined as "the number of divisors of n that are divisible by k", (k >= 1). For example if k = 1 we have A000005 by definition, if k = 2 we have this sequence. Note that if k >= 3 the sequences are not included in the OEIS because the usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception. - Omar E. Pol, Oct 18 2011
a(n) is also the number of partitions of n into equal parts, minus the number of partitions of n into consecutive parts. - Omar E. Pol, May 04 2017
a(n) is also the number of partitions of n into an even number of equal parts. - Omar E. Pol, May 14 2017
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{d>=1} x^(2*d)/(1 - x^(2*d)) and generally for the number of divisors that are divisible by k: Sum_{d>=1} x^(k*d)/(1 - x^(k*d)). - Geoffrey Critzer, Apr 15 2014
Dirichlet g.f.: zeta(s)^2/2^s and generally for the number of divisors that are divisible by k: zeta(s)^2/k^s. - Geoffrey Critzer, Mar 28 2015
a(n) = Sum_{i=1..n} (floor(n/(2*i)) - floor((n-1)/(2*i))).
Conjecture: a(n) = lim_{x->n} f(Pi*x), where f(x) = sin(x)*Sum_{k>0} (cot(x/(2*k))/(2*k) - 1/x). - Velin Yanev, Dec 16 2019
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma - 1/2 - log(2)/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
|
|
EXAMPLE
|
For n = 12, set of even divisors is {2, 4, 6, 12}, so a(12) = 4.
On the other hand, there are six partitions of 12 into equal parts: [12], [6, 6], [4, 4, 4], [3, 3, 3, 3], [2, 2, 2, 2, 2, 2] and [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]. And there are two partitions of 12 into consecutive parts: [12] and [5, 4, 3], so a(12) = 6 - 2 = 4, equaling the number of even divisors of 12. - Omar E. Pol, May 04 2017
|
|
MAPLE
|
if type(n, 'even') then
numtheory[tau](n/2) ;
else
0;
end if;
|
|
MATHEMATICA
|
Table[Length[Select[Divisors[n], EvenQ]], {n, 90}] (* Alonso del Arte, Jan 10 2012 *)
a[n_] := (e = IntegerExponent[n, 2]) * DivisorSigma[0, n / 2^e]; Array[a, 100] (* Amiram Eldar, Jul 06 2022 *)
|
|
PROG
|
(Haskell)
a183063 = sum . map (1 -) . a247795_row
(Sage)
def A183063(n): return len([1 for d in divisors(n) if is_even(d)])
(Magma) [IsOdd(n) select 0 else #[d:d in Divisors(n)|IsEven(d)]:n in [1..100]]; // Marius A. Burtea, Dec 16 2019
(Python)
from sympy import divisor_count
def A183063(n): return divisor_count(n>>(m:=(~n&n-1).bit_length()))*m # Chai Wah Wu, Jul 16 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|