cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005094 Number of distinct primes of the form 4k+1 dividing n minus number of distinct primes of the form 4k+3 dividing n.

This page as a plain text file.
%I A005094 #30 Jan 02 2024 02:45:44
%S A005094 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,
%T A005094 -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,
%U A005094 -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
%N A005094 Number of distinct primes of the form 4k+1 dividing n minus number of distinct primes of the form 4k+3 dividing n.
%H A005094 T. D. Noe, <a href="/A005094/b005094.txt">Table of n, a(n) for n = 1..10000</a>
%F A005094 Additive with a(p^e) = 0 if p = 2, 1 if p == 1 (mod 4), -1 if p == 3 (mod 4).
%F A005094 From _Reinhard Zumkeller_, Jan 07 2013: (Start)
%F A005094 a(n) = A005089(n) - A005091(n).
%F A005094 a(A221264(n)) < 0.
%F A005094 a(A078613(n)) = 0.
%F A005094 a(A221265(n)) > 0. (End)
%F A005094 a(A267099(n)) = -a(n). - _Antti Karttunen_, Feb 03 2016
%F A005094 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = -A086239 = -0.334981... . - _Amiram Eldar_, Jan 02 2024
%t A005094 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 *)
%o A005094 (Haskell)
%o A005094 a005094 n = a005089 n - a005091 n  -- _Reinhard Zumkeller_, Jan 07 2013
%Y A005094 Cf. A005089, A005091, A078613, A086239, A221264, A221265, A267099.
%Y A005094 Cf. A079635 (difference when counted with multiplicity).
%K A005094 sign,easy
%O A005094 1,21
%A A005094 _N. J. A. Sloane_
%E A005094 More precise definition from _Antti Karttunen_, Feb 03 2016