login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065704 Number of squares or twice squares dividing n. 4
1, 2, 1, 3, 1, 2, 1, 4, 2, 2, 1, 3, 1, 2, 1, 5, 1, 4, 1, 3, 1, 2, 1, 4, 2, 2, 2, 3, 1, 2, 1, 6, 1, 2, 1, 6, 1, 2, 1, 4, 1, 2, 1, 3, 2, 2, 1, 5, 2, 4, 1, 3, 1, 4, 1, 4, 1, 2, 1, 3, 1, 2, 2, 7, 1, 2, 1, 3, 1, 2, 1, 8, 1, 2, 2, 3, 1, 2, 1, 5, 3, 2, 1, 3, 1, 2, 1, 4, 1, 4, 1, 3, 1, 2, 1, 6, 1, 4, 2, 6, 1, 2, 1, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = (1/2)*Sum_{ d divides n } (1-(-1)^sigma(d)).
Multiplicative with a(2^e) = e+1 and a(p^e) = floor(e/2)+1 for an odd prime p.
a(n) = A005361(2*n) for n>0 (conjectured). - Werner Schulte, Jan 15 2018 [This is true only for numbers whose odd part (A000265) is cubefree (A004709). Therefore, the least counterexample is n=3^3=27: a(27) = 2 while A005361(2*27) = 3. - Amiram Eldar, Sep 25 2022]
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi^2/4 (A091476). - Amiram Eldar, Sep 25 2022
EXAMPLE
divisors(36) = {1, 2, 3, 4, 6, 9, 12, 18, 36}, thus a(36) = #{1, 2, 4, 9, 18, 36}=6. a(36) = 1/2*(tau(36)-((-1)^sigma(1)+(-1)^sigma(2)+(-1)^sigma(3)+(-1)^sigma(4)+(-1)^sigma(6)+(-1)^sigma(9)+(-1)^sigma(12)+(-1)^sigma(18)+(-1)^sigma(36))) = 1/2*(9-(-3)) = 6. a(36) = a(2^2*3^2) = a(2^2)*a(3^2) = (2+1)*(1+1) = 6.
MATHEMATICA
f[n_] := Total[1 - (-1)^DivisorSigma[1, Divisors@n]]/2; Array[f, 105] (* Robert G. Wilson v, Jan 02 2013 *)
f[p_, e_] := If[p == 2, e+1, Floor[e/2] + 1]; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 25 2022 *)
PROG
(PARI) a(n) = {my(e = valuation(n, 2), o = n>>e, f = factor(o)); (e+1)*prod(i=1 , #f~, floor(f[i, 2]/2)+1)}; \\ Amiram Eldar, Sep 25 2022
CROSSREFS
Sequence in context: A339914 A242923 A375040 * A325565 A286552 A324826
KEYWORD
mult,nonn
AUTHOR
Vladeta Jovovic, Dec 04 2001
EXTENSIONS
More terms from David Wasserman, Sep 09 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 10 21:39 EDT 2024. Contains 375058 sequences. (Running on oeis4.)