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.

A111972 a(n) = Max(omega(k): 1<=k<=n), where omega(n) = A001221(n), the number of distinct prime factors of n.

Original entry on oeis.org

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

Views

Author

Rick L. Shepherd, Aug 24 2005

Keywords

Comments

This sequence has the same relationship to A001221 as A000523 has to A001222. Also, for n>=1, n-1 occurs as A002110(n)-A002110(n-1) consecutive terms beginning with term a(A002110(n-1)), where A002110 is the primorials; i.e. the frequencies of occurrence are the first differences (1,4,24,180,...) of the primorials.

Examples

			a(7)=2 because omega(1)=0, omega(2)=omega(3)=omega(4)=omega(5)=omega(7)=1 and omega(6)=2 (as 6=2*3), so 2 is the maximum.
		

Crossrefs

Cf. A001221 (omega(n)), A002110 (primorials), A000523 (Log_2(n) rounded down), A001222 (Omega(n), also known as bigomega(n)).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          max(a(n-1), nops(ifactors(n)[2])))
        end:
    seq(a(n), n=1..105);  # Alois P. Heinz, Aug 19 2021
  • Mathematica
    FoldList[Max, PrimeNu /@ Range[105]] (* Michael De Vlieger, Dec 29 2021 *)