OFFSET
1,3
COMMENTS
Inverse Möbius transform of A152822.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20160
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
Matjaž Konvalinka and Vasu Tewari, Some natural extensions of the parking space, arXiv:2003.04134 [math.CO], 2020.
FORMULA
a(n) = Sum_{d|n, d == 0, 1 or 3 mod 4} 1.
Multiplicative with a(2^e) = e, a(p^e) = (e+1) for odd primes p.
From Amiram Eldar, Dec 30 2022: (Start)
Dirichlet g.f.: zeta(s)^2*(1 - 1/2^s + 1/4^s).
Sum_{k=1..n} a(k) ~ (3/4)*n*(log(n) + 2*gamma - 1), where gamma is Euler's constant (A001620). (End)
MATHEMATICA
Array[DivisorSum[#, 1 &, Mod[#, 4] != 2 &] &, 105] (* Michael De Vlieger, Jun 16 2020 *)
f[2, e_] := e; f[p_, e_] := e + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 30 2022 *)
PROG
(PARI) A320111(n) = sumdiv(n, d, (2!=(d%4)));
(PARI) A320111(n) = {my(f); f = factor(n); for(i=1, #f~, if(f[i, 1]>2, f[i, 2]++)); factorback(f[, 2])};
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
(PARI)
\\ A252463 given above
A001511(n) = 1+valuation(n, 2);
A000265(n) = (n>>valuation(n, 2));
(Python)
from sympy import divisor_count
def A320111(n): return divisor_count(n if n&1 else n>>1) # Chai Wah Wu, Jul 13 2022
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Nov 22 2018
STATUS
approved