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-6 of 6 results.

A001222 Number of prime divisors of n counted with multiplicity (also called big omega of n, bigomega(n) or Omega(n)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Maximal number of terms in any factorization of n.
Number of prime powers (not including 1) that divide n.
Sum of exponents in prime-power factorization of n. - Daniel Forgues, Mar 29 2009
Sum_{d|n} 2^(-A001221(d) - a(n/d)) = Sum_{d|n} 2^(-a(d) - A001221(n/d)) = 1 (see Dressler and van de Lune link). - Michel Marcus, Dec 18 2012
Row sums in A067255. - Reinhard Zumkeller, Jun 11 2013
Conjecture: Let f(n) = (x+y)^a(n), and g(n) = x^a(n), and h(n) = (x+y)^A046660(n) * y^A001221(n) with x, y complex numbers and 0^0 = 1. Then f(n) = Sum_{d|n} g(d)*h(n/d). This is proved for x = 1-y (see Dressler and van de Lune link). - Werner Schulte, Feb 10 2018
Let r, s be some fixed integers. Then we have:
(1) The sequence b(n) = Dirichlet convolution of r^bigomega(n) and s^bigomega(n) is multiplicative with b(p^e) = (r^(e+1)-s^(e+1))/(r-s) for prime p and e >= 0. The case r = s leads to b(p^e) = (e+1)*r^e.
(2) The sequence c(n) = Dirichlet convolution of r^bigomega(n) and mu(n)*s^bigomega(n) is multiplicative with c(p^e) = (r-s)*r^(e-1) and c(1) = 1 for prime p and e > 0 where mu(n) = A008683(n). - Werner Schulte, Feb 20 2019
a(n) is also the length of the composition series for every solvable group of order n. - Miles Englezou, Apr 25 2024

Examples

			16=2^4, so a(16)=4; 18=2*3^2, so a(18)=3.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 119, #12, omega(n).
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 48-57.
  • M. Kac, Statistical Independence in Probability, Analysis and Number Theory, Carus Monograph 12, Math. Assoc. Amer., 1959, see p. 64.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 92.

Crossrefs

Cf. A001221 (omega, primes counted without multiplicity), A008836 (Liouville's lambda, equal to (-1)^a(n)), A046660, A144494, A074946, A134334.
Bisections give A091304 and A073093. A086436 is essentially the same sequence. Cf. A022559 (partial sums), A066829 (parity), A092248 (parity of omega).
Sequences listing n such that a(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011
Cf. A079149 (primes adj. to integers with at most 2 prime factors, a(n)<=2).
Cf. A027748 (without repetition).
Cf. A000010.

Programs

  • GAP
    Concatenation([0],List([2..150],n->Length(Factors(n)))); # Muniru A Asiru, Feb 21 2019
    
  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a001222 = sum . 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, distinct=false) for n in 1:60])  # Peter Luschny, Jan 02 2024
  • Magma
    [n eq 1 select 0 else &+[p[2]: p in Factorization(n)]: n in [1..120]]; // Bruno Berselli, Nov 27 2013
    
  • Maple
    with(numtheory): seq(bigomega(n), n=1..111);
  • Mathematica
    Array[ Plus @@ Last /@ FactorInteger[ # ] &, 105]
    PrimeOmega[Range[120]] (* Harvey P. Dale, Apr 25 2011 *)
  • PARI
    vector(100,n,bigomega(n))
    
  • Python
    from sympy import primeomega
    def a(n): return primeomega(n)
    print([a(n) for n in range(1, 112)]) # Michael S. Branicky, Apr 30 2022
    
  • SageMath
    [sloane.A001222(n) for n in (1..120)] # Giuseppe Coppoletta, Jan 19 2015
    
  • SageMath
    [gp.bigomega(n) for n in range(1,131)] # G. C. Greubel, Jul 13 2024
    
  • Scheme
    (define (A001222 n) (let loop ((n n) (z 0)) (if (= 1 n) z (loop (/ n (A020639 n)) (+ 1 z)))))
    ;; Requires also A020639 for which an equally naive implementation can be found under that entry. - Antti Karttunen, Apr 12 2017
    

Formula

n = Product_(p_j^k_j) -> a(n) = Sum_(k_j).
Dirichlet g.f.: ppzeta(s)*zeta(s). Here ppzeta(s) = Sum_{p prime} Sum_{k>=1} 1/(p^k)^s. Note that ppzeta(s) = Sum_{p prime} 1/(p^s-1) and ppzeta(s) = Sum_{k>=1} primezeta(k*s). - Franklin T. Adams-Watters, Sep 11 2005
Totally additive with a(p) = 1.
a(n) = if n=1 then 0 else a(n/A020639(n)) + 1. - Reinhard Zumkeller, Feb 25 2008
a(n) = Sum_{k=1..A001221(n)} A124010(n,k). - Reinhard Zumkeller, Aug 27 2011
a(n) = A022559(n) - A022559(n-1).
G.f.: Sum_{p prime, k>=1} x^(p^k)/(1 - x^(p^k)). - Ilya Gutkovskiy, Jan 25 2017
a(n) = A091222(A091202(n)) = A000120(A156552(n)). - Antti Karttunen, circa 2004 and Mar 06 2017
a(n) >= A267116(n) >= A268387(n). - Antti Karttunen, Apr 12 2017
Sum_{k=1..n} 2^(-A001221(gcd(n,k)) - a(n/gcd(n,k)))/phi(n/gcd(n,k)) = Sum_{k=1..n} 2^(-a(gcd(n,k)) - A001221(n/gcd(n,k)))/phi(n/gcd(n,k)) = 1, where phi = A000010. - Richard L. Ollerton, May 13 2021
a(n) = a(A046523(n)) = A007814(A108951(n)) = A061395(A122111(n)) = A056239(A181819(n)) = A048675(A293442(n)). - Antti Karttunen, Apr 30 2022

Extensions

More terms from David W. Wilson

A143731 Characteristic function of numbers with at least two distinct prime factors (A024619).

Original entry on oeis.org

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

Views

Author

Reikku Kulon, Aug 30 2008

Keywords

Comments

a(n) = 1 iff n is divisible by at least two distinct primes; otherwise 0.

Crossrefs

Programs

Formula

a(n) = abs(A079872(n)) = A057427(A079275(n)).
For n>1: a(n) = 1 - floor(1/A001221(n)). - Enrique Pérez Herrero, Aug 13 2012

A285716 a(n) = A080791(A245611(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 25 2017

Keywords

Crossrefs

One less than A091304 after the initial term.
Cf. A006254 (gives the positions of zeros after initial a(1)=0.)

Programs

  • Mathematica
    a[n_] := PrimeOmega[2*n - 1] - 1; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jul 23 2023 *)
  • Scheme
    ;; First implementation uses memoization-macro definec:
    (definec (A285716 n) (if (<= n 2) 0 (+ (if (= 2 (modulo n 3)) 1 0) (A285716 (A285712 n)))))
    (define (A285716 n) (A080791 (A245611 n)))

Formula

a(1) = 0, a(2) = 1, for n > 2, a(n) = a(A285712(n)) + [n == 2 mod 3]. (Where [] is Iverson bracket, giving here 1 only if n is of the form 3k+2, and 0 otherwise.)
a(n) = A080791(A245611(n)).
For all n >= 2, a(n) = A091304(n)-1 = A000120(A244153(n))-1. - Antti Karttunen, May 31 2017

A286582 a(n) = A001222(A048673(n)).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 2, 2, 1, 1, 1, 1, 2, 1, 3, 1, 2, 2, 3, 5, 3, 3, 2, 3, 2, 2, 3, 3, 4, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 4, 1, 4, 3, 3, 2, 1, 2, 5, 2, 3, 3, 2, 1, 2, 1, 1, 2, 2, 4, 3, 2, 4, 3, 4, 2, 1, 3, 1, 3, 4, 2, 2, 4, 5, 7, 3, 3, 1, 2, 3, 4, 1, 1, 3, 5, 2, 1, 2, 1, 2, 5, 4, 6, 2, 3, 1, 2, 3, 2, 4, 3, 1, 1
Offset: 1

Views

Author

Antti Karttunen, May 31 2017

Keywords

Crossrefs

Programs

  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A048673(n) = (A003961(n)+1)/2;
    A286582(n) = bigomega(A048673(n));
    
  • Python
    from sympy import factorint, nextprime, primefactors, prod
    def a001222(n): return 0 if n==1 else a001222(n//primefactors(n)[-1]) + 1
    def a048673(n):
        f = factorint(n)
        return 1 if n==1 else (1 + prod(nextprime(i)**f[i] for i in f))//2
    def a(n): return a001222(a048673(n))
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jun 12 2017
  • Scheme
    (define (A286582 n) (A001222 (A048673 n)))
    

Formula

a(n) = A001222(A048673(n)).

A092523 Number of distinct prime factors of n-th odd number.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 07 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Table[PrimeNu[n],{n,1,211,2}] (* Harvey P. Dale, May 25 2015 *)
  • PARI
    a(n) = omega(2*n-1); \\ Amiram Eldar, Sep 21 2024

Formula

a(n) = A001221(2*n-1).
Sum_{k=1..n} a(k) = n * (log(log(n)) + B - 1/2) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 21 2024

A356855 a(n) is the least number m such that u defined by u(i) = bigomega(m + 2i) satisfies u(i) = u(0) for 0 <= i < n and u(n) != u(0), or -1 if no such number exists.

Original entry on oeis.org

1, 4, 3, 215, 213, 1383, 3091, 8129, 151403, 151401, 2560187, 33396293, 33396291, 56735777, 1156217487, 2514196079
Offset: 1

Views

Author

Jean-Marc Rebert, Sep 04 2022

Keywords

Examples

			Let u be defined by u(i) = bigomega(3 + 2i). u(i) = 1 for 0 <= i < 3 and u(3) = 2 != 1, and 3 is the smallest such number, hence a(3) = 3.
Let u be defined by u(i) = bigomega(4 + 2i). u(i) = 2 for 0 <= i < 2 and u(3) = 3 != 2 , and 4 is the smallest such number, hence a(2) = 4.
Let u be defined by u(i) = bigomega(151403 + 2i). u(i) = 3 for 0 <= i < 9 and u(9) = 2 != 3, and 151403 is the smallest such number, hence a(9) = 151403.
		

Crossrefs

Cf. A073093 and A091304 (the 2 bisections of A001222).

Programs

  • PARI
    u(m,i)=bigomega(m+2*i)
    card(m)=my(k=u(m,0),c=0);while(u(m,c)==k,c++);c
    a(n)=my(c=0);for(m=1,+oo,c=card(m);if(c==n,return(m)))
Showing 1-6 of 6 results.