In problem 10229 at UVa Online Judge, Modular Fibonacci, our task is to calculate huge Fibonacci numbers, modulo some given integer. Continue reading →

# Modulo

## Project Euler 48: Find the last ten digits of 1^1 + 2^2 + … + 1000^1000

Problem 48 of Project Euler has the nice and simple description

The series, 1^{1} + 2^{2} + 3^{3} + … + 10^{10} = 10405071317.

Find the last ten digits of the series, 1^{1} + 2^{2} + 3^{3} + … + 1000^{1000}.

When I first saw the problem, I thought I knew it would be trivial to solve with BigInteger. However, it turns out that the solution lacks performance, so I have derived another solution as well based on the properties of the modulo operator. Continue reading →

## Project Euler – Problem 1

Now that the fluff around the coding is covered, we are ready to solve the first problem.

The description of problem 1 on Project Euler reads

Find the sum of all the multiples of 3 or 5 below 1000.

There are multiple methods for finding the solution for this problem…

Continue reading →