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.

A120675 Number of prime factors of odd squarefree numbers A056911.

Original entry on oeis.org

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

Views

Author

Lekraj Beedassy, Jun 24 2006

Keywords

Comments

For n>1, a(n)=1 corresponds to numbers n that are odd primes.

Programs

  • Maple
    issquarefree := proc(n::integer) local nf, ifa ; nf := op(2,ifactors(n)) ; for ifa from 1 to nops(nf) do if op(2,op(ifa,nf)) >= 2 then RETURN(false) ; fi ; od : RETURN(true) ; end: A001221 := proc(n::integer) RETURN(nops(numtheory[factorset](n))) ; end: A056911 := proc(maxn) local n,a ; a := [1] ; for n from 3 to maxn by 2 do if issquarefree(n) then a := [op(a),n] ; fi ; od : RETURN(a) ; end: A120675 := proc(maxn) local a,n; a := A056911(maxn) ; for n from 1 to nops(a) do a := subsop(n=A001221(a[n]),a) ; od ; RETURN(a) ; end: nmax := 600 : a := A120675(nmax) : for n from 1 to nops(a) do printf("%d,",a[n]) ; od ; amer% # R. J. Mathar, Aug 17 2006
  • Mathematica
    PrimeNu[Select[Range[1, 1000, 2], SquareFreeQ]] (* G. C. Greubel, May 11 2017 *)

Formula

a(n) = A001221(A056911(n)) = A001222(A056911(n)).

Extensions

Corrected and extended by R. J. Mathar, Aug 17 2006