|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.math.misc.PrimeFactors
public class PrimeFactors
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.
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 |
---|
public PrimeFactors()
Method Detail |
---|
public static int omega(int n)
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.
n
- A natural.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |