Integer Analysis

This page and its accompanying scripts illustrate how functions, loops, and library files may be utilized within PHP.

Prime Finder

A positive integer is prime if it is greater than 1 and its only [positive integer] divisors are 1 and itself. This form determines if a postive integer is prime.

Enter integer:

Sum of Non-trivial Divisors

Every positive integer is divisible by 1 and itself, so those factors are considered trivial. A non-trivial divisor is a positive integer that evenly divides a number, other than 1 and the number itself.

The following form computes the sum of the non-trivial divisors of a number.

Enter integer:

Perfect Numbers

The ancient Greeks classified positive integers as follows:

The following form classifies a positive integer.

Enter integer:

Table of Number Classifications

Request a table of classifications for integers from 1 to