I’ve delved deeply into divisiblity over the last few weeks, and am now examining properties of squares and sums of squares. I offer the following proof by induction (some algebraic manipulation is required as well). It is known that the sum of the squares of the first n natural numbers is equal to [( n… Continue reading Proof By Induction: Sum of the Squares of Natural Numbers

# Category: number theory

## Testing Divisibility by 3.

So I did go ahead and program a dynamically generated Sieve of Eratosthenes, but I just wanted to write a quick post about divisibility by 3 before I write a novel about the Sieve. Many of us know the trick for checking an integer’s divisibility by 3: just sum the digits and if the resulting… Continue reading Testing Divisibility by 3.

## Divisibility: Not Just Modulus (2)

As promised in my last post, here I will explore divisibility by 7 (and 5) without relying exclusively on the modulus operator. Divisibility by 5 Divisibility by 5 can be determined by examining the last digit of an integer. If it is a 5 or a 0, then the integer is divisible by 5. This… Continue reading Divisibility: Not Just Modulus (2)

## Divisibility: Not Just Modulus

Prime Hunting I’m working on a Java program related to a Project Euler problem which asks you to find the largest prime factor of a very large composite, odd number. I’ve already solved the problem in terms of the specific number that Euler gives; but now I am beginning to play around with some different… Continue reading Divisibility: Not Just Modulus