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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A120630 Dirichlet inverse of A002654. 2
 1, -1, 0, 0, -2, 0, 0, 0, -1, 2, 0, 0, -2, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, -2, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 0, 2, 0, 0, 0, -1, -1, 0, 0, -2, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, -2, -2, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, -2, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 0, 2, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 LINKS Andrew Howroyd, Table of n, a(n) for n = 1..1000 FORMULA Multiplicative function with a(p^e)=0 if e>2. a(2)=-1, a(4)=0. If p is a prime congruent to 3 modulo 4, then a(p)=0 and a(p^2)=-1. If p is a prime congruent to 1 modulo 4, then a(p)=-2 and a(p^2)=1. Sum_{k=1..n} abs(a(k)) ~ c * n, where c = 3/(2*Pi*G) = 0.521269..., and G is Catalan's constant (A006752). - Amiram Eldar, Jan 22 2024 EXAMPLE a(65)=4 because 65 is 5 times 13 and both of those primes are congruent to 1 modulo 4. Doubling an odd index yields the opposite of the value (e.g., a(130)=-4) because a(2)=-1. Doubling an even index yields zero. MAPLE A120630 := proc(n) local a, pp; if n = 1 then 1; else a := 1 ; for pp in ifactors(n)[2] do if op(2, pp) > 2 then a := 0; elif op(1, pp) = 2 then if op(2, pp) = 1 then a := -a ; else a := 0 ; end if; elif modp(op(1, pp), 4) = 3 then if op(2, pp) = 1 then a := 0 ; else a := -a ; end if; else if op(2, pp) = 1 then a := -2*a ; else ; end if; end if; end do: a; end if; end proc: # R. J. Mathar, Sep 15 2015 MATHEMATICA A120630[n_] := Module[{a, pp}, If[n == 1, 1, a = 1; Do[Which[pp[[2]] > 2, a = 0, pp[[1]] == 2, If[pp[[2]] == 1, a = -a, a = 0], Mod[pp[[1]], 4] == 3, If[pp[[2]] == 1, a = 0, a = -a], True, If[pp[[2]] == 1, a = -2*a]], {pp, FactorInteger[n]}]; a]]; Array[A120630, 120] (* Jean-François Alcover, Apr 24 2017, after R. J. Mathar *) PROG (PARI) seq(n)={dirdiv(vector(n, n, n==1), vector(n, n, sumdiv( n, d, (d%4==1) - (d%4==3))))} \\ Andrew Howroyd, Aug 05 2018 CROSSREFS Cf. A002654, A006752, A023900, A046692, A053822, A053825, A053826, A101035. Sequence in context: A186336 A025891 A341000 * A248509 A281542 A331844 Adjacent sequences: A120627 A120628 A120629 * A120631 A120632 A120633 KEYWORD mult,easy,sign AUTHOR Gerard P. Michon, Jun 25 2006 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.

Last modified September 13 09:59 EDT 2024. Contains 375904 sequences. (Running on oeis4.)