tribble.math.misc
Class PrimeFactors

java.lang.Object
  extended by tribble.math.misc.PrimeFactors

public class PrimeFactors
extends java.lang.Object

Determine the number of prime factors for a sequence of naturals.

Utilizes a function (rediscovered by the author, Sep 2006) which determines the number of prime factors for a given natural (integer). The function omega() is defined as:
Omega(0) = 0
;
Omega(1) = 0
;
Omega(p) = 1, for any prime p;
Omega(pk) = Omega(k)+1, for any prime p.

See sequence A001222 at the On-Line Encyclopedia of Integer Sequences.

Since:
2006-09-10
Version:
$Revision: 1.2 $ $Date: 2006/09/10 15:28:35 $
Author:
David R. Tribble (david@tribble.com)

Copyright ©2006 by David R. Tribble, all rights reserved. Permission is granted to use, modify, reference, and publish this source code provided that the original atuhorship and copyright notices remain intact and unaltered.


Constructor Summary
PrimeFactors()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static int omega(int n)
          Determine the number of prime factors for a given natural.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimeFactors

public PrimeFactors()
Method Detail

omega

public static int omega(int n)
Determine the number of prime factors for a given natural.

This function is defined as:
Omega(0) = 0
;
Omega(1) = 0
;
Omega(p) = 1, for any prime p;
Omega(pk) = Omega(k)+1, for any prime p.

Parameters:
n - A natural.
Since:
2006-09-09

main

public static void main(java.lang.String[] args)