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.

Showing 1-10 of 11 results. Next

A001221 Number of distinct primes dividing n (also called omega(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 2, 1, 3, 2
Offset: 1

Views

Author

Keywords

Comments

From Peter C. Heinig (algorithms(AT)gmx.de), Mar 08 2008: (Start)
This is also the number of maximal ideals of the ring (Z/nZ,+,*). Since every finite integral domain must be a field, every prime ideal of Z/nZ is a maximal ideal and since in general each maximal ideal is prime, there are just as many prime ideals as maximal ones in Z/nZ, so the sequence gives the number of prime ideals of Z/nZ as well.
The reason why this number is given by the sequence is that the ideals of Z/nZ are precisely the subgroups of (Z/nZ,+). Hence for an ideal to be maximal it has form a maximal subgroup of (Z/nZ,+) and this is equivalent to having prime index in (Z/nZ) and this is equivalent to being generated by a single prime divisor of n.
Finally, all the groups arising in this way have different orders, hence are different, so the number of maximal ideals equals the number of distinct primes dividing n. (End)
Equals double inverse Mobius transform of A143519, where A051731 = the inverse Mobius transform. - Gary W. Adamson, Aug 22 2008
a(n) is the number of unitary prime power divisors of n (not including 1). - Jaroslav Krizek, May 04 2009 [corrected by Ilya Gutkovskiy, Oct 09 2019]
Sum_{d|n} 2^(-A001221(d) - A001222(n/d)) = Sum_{d|n} 2^(-A001222(d) - A001221(n/d)) = 1 (see Dressler and van de Lune link). - Michel Marcus, Dec 18 2012
Up to 2*3*5*7*11*13*17*19*23*29 - 1 = 6469693230 - 1, also the decimal expansion of the constant 0.01111211... = Sum_{k>=0} 1/(10 ^ A000040(k) - 1) (see A073668). - Eric Desbiaux, Jan 20 2014
The average order of a(n): Sum_{k=1..n} a(k) ~ Sum_{k=1..n} log log k. - Daniel Forgues, Aug 13-16 2015
From Peter Luschny, Jul 13 2023: (Start)
We can use A001221 and A001222 to classify the positive integers as follows.
A001222(n) = A001221(n) = 0 singles out {1}.
Restricting to n > 1:
A001222(n)^A001221(n) = 1: A000040, prime numbers.
A001221(n)^A001222(n) = 1: A246655, prime powers.
A001222(n)^A001221(n) > 1: A002808, the composite numbers.
A001221(n)^A001222(n) > 1: A024619, complement of A246655.
n^(A001222(n) - A001221(n)) = 1: A144338, products of distinct primes. (End)
Inverse Möbius transform of the characteristic function of primes (A010051). - Wesley Ivan Hurt, Jun 22 2024
Dirichlet convolution of A010051(n) and 1. - Wesley Ivan Hurt, Jul 15 2025

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 48-57.
  • J. Peters, A. Lodge and E. J. Ternouth, E. Gifford, Factor Table (n<100000) (British Association Mathematical Tables Vol.V), Burlington House/Cambridge University Press London 1935.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001222 (primes counted with multiplicity), A046660, A285577, A346617. Partial sums give A013939.
Sum of the k-th powers of the primes dividing n for k=0..10: this sequence (k=0), A008472 (k=1), A005063 (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), A351196 (k=8), A351197 (k=9), A351198 (k=10).
Sequences of the form n^k * Sum_{p|n, p prime} 1/p^k for k=0..10: this sequence (k=0), A069359 (k=1), A322078 (k=2), A351242 (k=3), A351244 (k=4), A351245 (k=5), A351246 (k=6), A351247 (k=7), A351248 (k=8), A351249 (k=9), A351262 (k=10).

Programs

  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a001221 = length . snd . unzip . factorise
    -- Reinhard Zumkeller, Nov 28 2015
    
  • Julia
    using Nemo
    function NumberOfPrimeFactors(n; distinct=true)
        distinct && return length(factor(ZZ(n)))
        sum(e for (p, e) in factor(ZZ(n)); init=0)
    end
    println([NumberOfPrimeFactors(n) for n in 1:60]) # Peter Luschny, Jan 02 2024
  • Magma
    [#PrimeDivisors(n): n in [1..120]]; // Bruno Berselli, Oct 15 2021
    
  • Maple
    A001221 := proc(n) local t1, i; if n = 1 then return 0 else t1 := 0; for i to n do if n mod ithprime(i) = 0 then t1 := t1 + 1 end if end do end if; t1 end proc;
    A001221 := proc(n) nops(numtheory[factorset](n)) end proc: # Emeric Deutsch
    omega := n -> NumberTheory:-NumberOfPrimeFactors(n, 'distinct'): # Peter Luschny, Jun 15 2025
  • Mathematica
    Array[ Length[ FactorInteger[ # ] ]&, 100 ]
    PrimeNu[Range[120]]  (* Harvey P. Dale, Apr 26 2011 *)
  • MuPAD
    func(nops(numlib::primedivisors(n)), n):
    
  • MuPAD
    numlib::omega(n)$ n=1..110 // Zerinvary Lajos, May 13 2008
    
  • PARI
    a(n)=omega(n)
    
  • Python
    from sympy.ntheory import primefactors
    print([len(primefactors(n)) for n in range(1, 1001)])  # Indranil Ghosh, Mar 19 2017
    
  • Sage
    def A001221(n): return sum(1 for p in divisors(n) if is_prime(p))
    [A001221(n) for n in (1..80)] # Peter Luschny, Feb 01 2012
    
  • SageMath
    [sloane.A001221(n) for n in (1..111)] # Giuseppe Coppoletta, Jan 19 2015
    
  • SageMath
    [gp.omega(n) for n in range(1,101)] # G. C. Greubel, Jul 13 2024
    

Formula

G.f.: Sum_{k>=1} x^prime(k)/(1-x^prime(k)). - Benoit Cloitre, Apr 21 2003; corrected by Franklin T. Adams-Watters, Sep 01 2009
Dirichlet generating function: zeta(s)*primezeta(s). - Franklin T. Adams-Watters, Sep 11 2005
Additive with a(p^e) = 1.
a(1) = 0, a(p) = 1, a(pq) = 2, a(pq...z) = k, a(p^k) = 1, where p, q, ..., z are k distinct primes and k natural numbers. - Jaroslav Krizek, May 04 2009
a(n) = log_2(Sum_{d|n} mu(d)^2). - Enrique Pérez Herrero, Jul 09 2012
a(A002110(n)) = n, i.e., a(prime(n)#) = n. - Jean-Marc Rebert, Jul 23 2015
a(n) = A091221(A091202(n)) = A069010(A156552(n)). - Antti Karttunen, circa 2004 & Mar 06 2017
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))^(1/prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
a(n) = log_2(Sum_{k=1..n} mu(gcd(n,k))^2/phi(n/gcd(n,k))) = log_2(Sum_{k=1..n} mu(n/gcd(n,k))^2/phi(n/gcd(n,k))), where phi = A000010 and mu = A008683. - Richard L. Ollerton, May 13 2021
Sum_{k=1..n} 2^(-a(gcd(n,k)) - A001222(n/gcd(n,k)))/phi(n/gcd(n,k)) = Sum_{k=1..n} 2^(-A001222(gcd(n,k)) - a(n/gcd(n,k)))/phi(n/gcd(n,k)) = 1, where phi = A000010. - Richard L. Ollerton, May 13 2021
a(n) = A005089(n) + A005091(n) + A059841(n) = A005088(n) +A005090(n) +A079978(n). - R. J. Mathar, Jul 22 2021
From Wesley Ivan Hurt, Jun 22 2024: (Start)
a(n) = Sum_{p|n, p prime} 1.
a(n) = Sum_{d|n} c(d), where c = A010051. (End)

A065339 Number of primes congruent to 3 modulo 4 dividing n (with multiplicity).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0, 2, 1, 1, 1, 0, 0, 3, 1, 0, 1, 1, 0, 2, 0, 1, 2, 0, 1, 1, 0, 0, 2, 1, 1, 2, 1, 1, 1, 2, 0, 1, 0, 0, 3, 1, 1, 2, 0, 1, 1, 0, 1, 3, 0, 0, 2, 1, 0, 2, 1, 1, 2, 0, 0, 1, 1, 2, 1, 1, 0, 4, 0, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 1, 0, 2, 3, 0, 0, 1, 1, 0, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 29 2001

Keywords

Crossrefs

Programs

  • Haskell
    a065339 1 = 0
    a065339 n = length [x | x <- a027746_row n, mod x 4 == 3]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Maple
    A065339 := proc(n)
        a := 0 ;
        for f in ifactors(n)[2] do
            if op(1,f) mod 4 = 3 then
                a := a+op(2,f) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Dec 16 2011
  • Mathematica
    f[n_]:=Plus@@Last/@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==3&]; Table[f[n],{n,100}] (* Ray Chandler, Dec 18 2011 *)
  • PARI
    A065339(n)=sum(i=1,#n=factor(n)~,if(n[1,i]%4==3,n[2,i]))  \\ M. F. Hasler, Apr 16 2012
    
  • Scheme
    ;; using memoization-macro definec
    (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) (else (+ (/ (- (modulo (A020639 n) 4) 1) 2) (A065339 (A032742 n))))))
    ;; Antti Karttunen, Aug 14 2015
    
  • Scheme
    ;; using memoization-macro definec
    (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) ((= 1 (modulo (A020639 n) 4)) (A065339 (A032742 n))) (else (+ (A067029 n) (A065339 (A028234 n))))))
    ;; Antti Karttunen, Aug 14 2015

Formula

a(n) = A001222(n) - A007814(n) - A083025(n).
(2^A007814(n)) * (3^a(n)) = A065338(n).
From Antti Karttunen, Aug 14 2015: (Start)
a(1) = a(2) = 0; thereafter, if n is even, a(n) = a(n/2), otherwise a(n) = ((A020639(n) mod 4)-1)/2 + a(n/A020639(n)). [Where A020639(n) gives the smallest prime factor of n.]
Other identities and observations. For all n >= 1:
a(n) = A007949(A065338(n)).
a(n) = A001222(A097706(n)).
a(n) >= A260728(n). [See A260730 for the positions of differences.] (End)
Totally additive with a(2) = 0, a(p) = 1 if p == 3 (mod 4), and a(p) = 0 if p == 1 (mod 4). - Amiram Eldar, Jun 17 2024

A086275 Number of distinct Gaussian primes in the factorization of n.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 1, 1, 1, 3, 1, 2, 2, 2, 3, 1, 2, 2, 1, 3, 2, 2, 1, 2, 2, 3, 1, 2, 2, 4, 1, 1, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 1, 2, 3, 2, 1, 2, 1, 3, 3, 3, 2, 2, 3, 2, 2, 3, 1, 4, 2, 2, 2, 1, 4, 3, 1, 3, 2, 4, 1, 2, 2, 3, 3, 2, 2, 4, 1, 3, 1, 3, 1, 3, 4, 2, 3, 2, 2, 4, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3
Offset: 1

Views

Author

T. D. Noe, Jul 14 2003

Keywords

Comments

As shown in the formula, a(n) depends on the number of distinct primes of the forms 4*k+1 (A005089) and 4*k-1 (A005091) and whether n is divisible by 2 (A059841).
Note that associated divisors are counted only once. - Jianing Song, Aug 30 2018

Examples

			a(1006655265000) = a(2^3*3^2*5^4*7^5*11^3) = 1 + 2*1 + 3 = 6 because n is divisible by 2, has 1 prime factor of the form 4*k+1 and 3 primes of the form 4*k+3. Over the Gaussian integers, 1006655265000 is factored as i*(1 + i)^6*(2 + i)^4*(2 - i)^4*3^2*7^5*11^3, the 6 distinct Gaussian factors are 1 + i, 2 + i, 2 - i, 3, 7 and 11.
		

Crossrefs

Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): A062327 ("d", A000005), A317797 ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), this sequence ("omega", A001221), A078458 ("Omega", A001222), A318608 ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319443.

Programs

  • Mathematica
    Join[{0}, Table[f=FactorInteger[n, GaussianIntegers->True]; cnt=Length[f]; If[MemberQ[{-1, I, -I}, f[[1, 1]]], cnt-- ]; cnt, {n, 2, 100}]]
    a[n_]:=If[n==2,1,PrimeNu[n, GaussianIntegers -> True]]; Array[a,100] (* Stefano Spezia, Sep 29 2024 *)
  • PARI
    a(n)=my(f=factor(n)[,1]); sum(i=1,#f,if(f[i]%4==1,2,1)) \\ Charles R Greathouse IV, Sep 14 2015

Formula

a(n) = A059841(n) + 2*A005089(n) + A005091(n).
Additive with a(p^e) = 2 if p = 1 (mod 4), 1 otherwise. - Franklin T. Adams-Watters, Oct 18 2006

A072437 Numbers with no prime factors of form 4*k+3.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 13, 16, 17, 20, 25, 26, 29, 32, 34, 37, 40, 41, 50, 52, 53, 58, 61, 64, 65, 68, 73, 74, 80, 82, 85, 89, 97, 100, 101, 104, 106, 109, 113, 116, 122, 125, 128, 130, 136, 137, 145, 146, 148, 149, 157, 160, 164, 169, 170, 173, 178, 181, 185, 193, 194
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 17 2002

Keywords

Comments

m is a term iff A072436(m) = m.
These numbers have density zero (Pollack).

Crossrefs

Cf. A004144, A002144, A002145, A004613 (odd terms).
A097706(a(n)) = 1.
Cf. A187811 (complement).

Programs

Formula

n>0 such that A001842(n)=0. - Benoit Cloitre, Apr 24 2003
A005091(a(n)) = 0. - Reinhard Zumkeller, Jan 07 2013
A065339(a(n)) = 0 . - R. J. Mathar, Jan 28 2025

A005089 Number of distinct primes == 1 (mod 4) dividing n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 2, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A001221, A005091, A005094, A083025 (with multiplicity).

Programs

  • Haskell
    a005089 = sum . map a079260 . a027748_row
    -- Reinhard Zumkeller, Jan 07 2013
    
  • Magma
    [#[p:p in PrimeDivisors(n)|p mod 4 eq 1]: n in [1..100]]; // Marius A. Burtea, Jan 16 2020
  • Maple
    A005089 := proc(n)
        local a,pe;
        a := 0 ;
        for pe in ifactors(n)[2] do
            if modp(op(1,pe),4) =1 then
                a := a+1 ;
            end if;
        end do:
        a ;
    end  proc:
    seq(A005089(n),n=1..100) ; # R. J. Mathar, Jul 22 2021
  • Mathematica
    f[n_]:=Length@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==1&]; Table[f[n],{n,102}] (* Ray Chandler, Dec 18 2011 *)
    a[n_] := DivisorSum[n, Boole[PrimeQ[#] && Mod[#, 4] == 1]&]; Array[a, 100] (* Jean-François Alcover, Dec 01 2015 *)
  • PARI
    for(n=1,100,print1(sumdiv(n,d,isprime(d)*if((d-1)%4,0,1)),","))
    

Formula

Additive with a(p^e) = 1 if p == 1 (mod 4), 0 otherwise.
From Reinhard Zumkeller, Jan 07 2013: (Start)
a(n) = Sum_{k=1..A001221(n)} A079260(A027748(n,k)).
a(A004144(n)) = 0.
a(A009003(n)) > 0. (End)

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

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A079635 (difference when counted with multiplicity).

Programs

  • Haskell
    a005094 n = a005089 n - a005091 n  -- Reinhard Zumkeller, Jan 07 2013
  • 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 *)

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

Extensions

More precise definition from Antti Karttunen, Feb 03 2016

A078613 Same numbers of distinct prime factors of forms 4*k+1 and 4*k+3.

Original entry on oeis.org

1, 2, 4, 8, 15, 16, 30, 32, 35, 39, 45, 51, 55, 60, 64, 70, 75, 78, 87, 90, 91, 95, 102, 110, 111, 115, 117, 119, 120, 123, 128, 135, 140, 143, 150, 153, 155, 156, 159, 174, 175, 180, 182, 183, 187, 190, 203, 204, 215, 219, 220, 222, 225, 230, 234, 235, 238, 240
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 10 2002

Keywords

Comments

Equivalently, numbers n such that A005089(n)=A005091(n); A005094(a(n))=0.
A001221(a(n)) and a(n) are of opposite parity.
If m is in the sequence, then also 2*m.
Conjecture : a(n) is asymptotic to c*n where c is around 4 - Benoit Cloitre, Jan 06 2003

Examples

			n = 99 = [(4*0+3)^2]*[(4*1+1)], therefore 99 is a term.
		

Crossrefs

Programs

  • Haskell
    a078613 n = a078613_list !! (n-1)
    a078613_list = filter ((== 0) . a005094) [1..]
    -- Reinhard Zumkeller, Jan 07 2013
  • Mathematica
    fQ[n_]:=Plus@@((Mod[#[[1]],4]-2)&/@If[n==1,{},FactorInteger[n]])==0; Select[Range[240],fQ] (* Ray Chandler, Dec 18 2011*)

Extensions

Edited by Ray Chandler, Dec 18 2011

A221264 Numbers having fewer distinct prime factors of form 4*k+1 than of 4*k+3.

Original entry on oeis.org

3, 6, 7, 9, 11, 12, 14, 18, 19, 21, 22, 23, 24, 27, 28, 31, 33, 36, 38, 42, 43, 44, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 66, 67, 69, 71, 72, 76, 77, 79, 81, 83, 84, 86, 88, 92, 93, 94, 96, 98, 99, 103, 105, 107, 108, 112, 114, 118, 121, 124, 126, 127, 129
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2013

Keywords

Comments

A005089(a(n)) < A005091(a(n)); A005094(a(n)) < 0.

Crossrefs

Programs

  • Haskell
    a221264 n = a221264_list !! (n-1)
    a221264_list = filter ((< 0) . a005094) [1..]
    
  • PARI
    is_A221264(n)={#(n=vecsort(factor(n>>valuation(n,2))[,1]%4))&&n[(1+#n)\2]==3} \\ M. F. Hasler, Dec 17 2014

A221265 Numbers having more distinct prime factors of form 4*k+1 than of 4*k+3.

Original entry on oeis.org

5, 10, 13, 17, 20, 25, 26, 29, 34, 37, 40, 41, 50, 52, 53, 58, 61, 65, 68, 73, 74, 80, 82, 85, 89, 97, 100, 101, 104, 106, 109, 113, 116, 122, 125, 130, 136, 137, 145, 146, 148, 149, 157, 160, 164, 169, 170, 173, 178, 181, 185, 193, 194, 195, 197, 200, 202
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2013

Keywords

Comments

A005089(a(n)) > A005091(a(n)); A005094(a(n)) > 0.

Crossrefs

Programs

  • Haskell
    a221265 n = a221265_list !! (n-1)
    a221265_list = filter ((> 0) . a005094) [1..]
  • Mathematica
    mdpf1Q[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]},Count[f,?(Mod[ #,4] == 1&)]>Count[f,?(Mod[#,4]==3&)]]; Select[Range[2,250],mdpf1Q] (* Harvey P. Dale, Mar 03 2016 *)

A187811 Numbers having at least one prime factor of form 4*k+3.

Original entry on oeis.org

3, 6, 7, 9, 11, 12, 14, 15, 18, 19, 21, 22, 23, 24, 27, 28, 30, 31, 33, 35, 36, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 51, 54, 55, 56, 57, 59, 60, 62, 63, 66, 67, 69, 70, 71, 72, 75, 76, 77, 78, 79, 81, 83, 84, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2013

Keywords

Comments

A005091(a(n)) > 0. - Reinhard Zumkeller, Jan 07 2013

Crossrefs

Cf. A072437 (complement); A002145, A009003.

Programs

  • Haskell
    import Data.List (findIndices)
    a187811 n = a187811_list !! (n-1)
    a187811_list = map (+ 1) $ findIndices (> 0) a005091_list
    -- Reinhard Zumkeller, Jan 07 2013
    
  • Mathematica
    pfQ[n_]:=AnyTrue[Transpose[FactorInteger[n]][[1]],Mod[#,4]==3&]; Select[ Range[100],pfQ] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 26 2016 *)
  • PARI
    is(n)=if(n%4==3,return(1)); my(f=factor(n)[,1]%4); for(i=1,#f, if(f[i]==3, return(1))); 0 \\ Charles R Greathouse IV, Sep 01 2015

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 01 2015
Showing 1-10 of 11 results. Next