[go: up one dir, main page]

login
A005094
Number of distinct primes of the form 4k+1 dividing n minus number of distinct primes of the form 4k+3 dividing n.
9
0, 0, -1, 0, 1, -1, -1, 0, -1, 1, -1, -1, 1, -1, 0, 0, 1, -1, -1, 1, -2, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 0, -2, 1, 0, -1, 1, -1, 0, 1, 1, -2, -1, -1, 0, -1, -1, -1, -1, 1, 0, 1, 1, -1, 0, -1, -2, 1, -1, 0, 1, -1, -2, 0, 2, -2, -1, 1, -2, 0, -1, -1, 1, 1, 0, -1, -2, 0, -1, 1, -1
OFFSET
1,21
FORMULA
Additive with a(p^e) = 0 if p = 2, 1 if p == 1 (mod 4), -1 if p == 3 (mod 4).
From Reinhard Zumkeller, Jan 07 2013: (Start)
a(n) = A005089(n) - A005091(n).
a(A221264(n)) < 0.
a(A078613(n)) = 0.
a(A221265(n)) > 0. (End)
a(A267099(n)) = -a(n). - Antti Karttunen, Feb 03 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = -A086239 = -0.334981... . - Amiram Eldar, Jan 02 2024
MATHEMATICA
Join[{0}, Table[Total[Which[Mod[#, 4]==1, 1, Mod[#, 4]==3, -1, True, 0]&/@ FactorInteger[ n][[All, 1]]], {n, 2, 100}]] (* Harvey P. Dale, Sep 03 2022 *)
PROG
(Haskell)
a005094 n = a005089 n - a005091 n -- Reinhard Zumkeller, Jan 07 2013
CROSSREFS
Cf. A079635 (difference when counted with multiplicity).
Sequence in context: A037912 A056980 A268643 * A121372 A359432 A338639
KEYWORD
sign,easy
EXTENSIONS
More precise definition from Antti Karttunen, Feb 03 2016
STATUS
approved