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.

A005091 Number of distinct primes = 3 mod 4 dividing n.

This page as a plain text file.
%I A005091 #32 Jul 07 2024 11:11:21
%S A005091 0,0,1,0,0,1,1,0,1,0,1,1,0,1,1,0,0,1,1,0,2,1,1,1,0,0,1,1,0,1,1,0,2,0,
%T A005091 1,1,0,1,1,0,0,2,1,1,1,1,1,1,1,0,1,0,0,1,1,1,2,0,1,1,0,1,2,0,0,2,1,0,
%U A005091 2,1,1,1,0,0,1,1,2,1,1,0,1,0,1,2,0,1,1,1,0,1,1,1,2,1,1,1,0,1,2,0,0,1
%N A005091 Number of distinct primes = 3 mod 4 dividing n.
%H A005091 Reinhard Zumkeller, <a href="/A005091/b005091.txt">Table of n, a(n) for n = 1..10000</a>
%H A005091 Étienne Fouvry and Peter Koymans, <a href="https://arxiv.org/abs/2001.05350">On Dirichlet biquadratic fields</a>, arXiv:2001.05350 [math.NT], 2020.
%F A005091 Additive with a(p^e) = 1 if p = 3 (mod 4), 0 otherwise.
%F A005091 From _Reinhard Zumkeller_, Jan 07 2013: (Start)
%F A005091 a(n) = Sum_{k=1..A001221(n)} A079261(A027748(n,k)).
%F A005091 a(A072437(n)) = 0.
%F A005091 a(A187811(n)) > 0. (End)
%F A005091 a(n) = Sum_{p|n} (binomial(p,3) mod 2), where p is a prime. - _Ridouane Oudra_, Nov 19 2019
%p A005091 with(numtheory): seq(add(binomial(p,3) mod 2, p in factorset(n)), n=1..100); # _Ridouane Oudra_, Nov 19 2019
%t A005091 f[n_]:=Length@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==3&]; Table[f[n],{n,102}] (* _Ray Chandler_, Dec 18 2011 *)
%o A005091 (PARI) for(n=1,100,print1(sumdiv(n,d,isprime(d)*if((d-3)%4,0,1)),","))
%o A005091 (Haskell)
%o A005091 a005091 = sum . map a079261 . a027748_row
%o A005091 -- _Reinhard Zumkeller_, Jan 07 2013
%o A005091 (Magma) [0] cat [#[p:p in PrimeDivisors(n)| p mod 4 eq 3]: n in [2..100]]; // _Marius A. Burtea_, Nov 19 2019
%o A005091 (Magma) [0] cat [&+[Binomial(p,3) mod 2:p in PrimeDivisors(n)]:n in [2..100]]; // _Marius A. Burtea_, Nov 19 2019
%o A005091 (Python)
%o A005091 from sympy import primefactors
%o A005091 def A005091(n): return sum(1 for p in primefactors(n) if p&3==3) # _Chai Wah Wu_, Jul 07 2024
%Y A005091 Cf. A001221, A005089, A005094.
%Y A005091 Cf. A079261, A027748, A072437, A187811.
%K A005091 nonn
%O A005091 1,21
%A A005091 _N. J. A. Sloane_