login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079635 Sum of (2 - p mod 4) for all prime factors p of n (with repetition). 8
0, 0, -1, 0, 1, -1, -1, 0, -2, 1, -1, -1, 1, -1, 0, 0, 1, -2, -1, 1, -2, -1, -1, -1, 2, 1, -3, -1, 1, 0, -1, 0, -2, 1, 0, -2, 1, -1, 0, 1, 1, -2, -1, -1, -1, -1, -1, -1, -2, 2, 0, 1, 1, -3, 0, -1, -2, 1, -1, 0, 1, -1, -3, 0, 2, -2, -1, 1, -2, 0, -1, -2, 1, 1, 1, -1, -2, 0, -1, 1, -4, 1, -1, -2, 2, -1, 0, -1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,9

COMMENTS

a(n) = {number of primes of the form 4k+1 dividing n} minus {number of primes of the form 4k+3 dividing n}, both counted with multiplicity. - Antti Karttunen, Feb 03 2016, after the formula.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A083025(n) - A065339(n).

Other identities. For all n >= 1:

a(A267099(n)) = -a(n). - Antti Karttunen, Feb 03 2016

EXAMPLE

a(55) = a(5*11) = (2 - 5 mod 4)+(2 - 11 mod 4) = (2-1)+(2-3) = (1)+(-1) = 0.

MAPLE

f:= proc(n) local t;

add(t[2]*(2-(t[1] mod 4)), t=ifactors(n)[2])

end proc:

map(f, [$1..100]); # Robert Israel, Feb 05 2016

MATHEMATICA

f[n_]:=Plus@@((2-Mod[#[[1]], 4])*#[[2]]&/@If[n==1, {}, FactorInteger[n]]); Table[f[n], {n, 100}] (* Ray Chandler, Dec 20 2011 *)

PROG

(Haskell)

a079635 1 = 0

a079635 n = sum $ map ((2 - ) . (`mod` 4)) $ a027746_row n

-- Reinhard Zumkeller, Jan 10 2012

(Scheme) (define (A079635 n) (- (A083025 n) (A065339 n))) ;; Antti Karttunen, Feb 03 2016

CROSSREFS

Cf. A065339, A083025.

Cf. A072202 (indices of zeros), A268379 (of strictly positive terms), A268380 (of negative terms), A268381 (of nonnegative terms).

Cf. A027746, A267099.

Cf. A005094 (difference when counting only distinct primes).

Sequence in context: A090405 A237837 A168509 * A037909 A181506 A319797

Adjacent sequences:  A079632 A079633 A079634 * A079636 A079637 A079638

KEYWORD

sign

AUTHOR

Reinhard Zumkeller, Jan 30 2003

EXTENSIONS

Edited by Ray Chandler, Dec 20 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 19 02:29 EDT 2019. Contains 323377 sequences. (Running on oeis4.)