| | Input: integer |
| Output: the clique number |
| (1) | Pollard Rho Prime Factorization ( is prime, is index). |
| (2) | if is a composite number then |
| (3) | if = 1(i = 1 to n) then |
| (4) | The clique number is the number of prime factors . |
| (5) | else if mod 2 0 (i = 1 to ) then |
| (6) | The clique number is . |
| (7) | else if mod 2 0 ( =1 to ) and mod 2 1 ( =1 to ) and and then |
| (8) | The clique number is ( is the number of prime factors that are odd, and is the number of prime factors that are even). |
| (9) | else |
| (10) | Integer is prime, and the clique number does not exist. |
| (11) | end if |
| (12) | end if |