SOLUTION

Jeffrey Considine
P.O. Box 15480
Boston, MA 02215
jconsidi@bu.edu

This program is for all three categories.

Layer 1 

This program factors numbers given as input. To do so,
it reads itself as input and extracts all the spaces and tabs which
are changed to 0's and 1's respectively. This binary string is packed,
the bits are flipped, cases switched, and then the string is evaluated
to do the factoring. The whitespace program was under 512
non-whitespace characters in its original form but ballooned by a
factor of 8 when converted to whitespace. I had a Perl script to embed
the whitespace of course.

Layer 0

The program within the whitespace factors by an algorithm I invented.
Starting at the square root, it calculates the slope of p/x where p is
the number to factor and rounds it down to 1/n, where n is an
integer. It makes two parallel lines with this slope on either side of
p/x so that there can not be an integral lattice point between the
lines, so as x increases, it can't be a factor until it intersects the
upper line (the lower is a strict lower bound). This intersection is
found with a little algebra and the quadratic formula and x is
advanced to the intersection. To get the mess that is there now, I
inlined several terms, cut out the error checking (unused die's...),
rearranged several terms, and renamed half the remaining variables to
use built-in variables.

Other stuff I did
=================

re-exec perl to wipe out debugger
$0 == ${$[|$|} from Terry Greenlaw in 0th Perl Contest
turn off debugging flag with inplace editing flag
round up square root by rounding down sqrt((sqrt + 1)**2-1)
check factor with loop adding terms that don't affect truth value