I believe I was meant to solve problem 25 with byte arrays or some other kind of fancy large integer arithmetic, but .Net's BigInteger class is, of course, very fast and easy to use.

Problem 25 reads:

The Fibonacci sequence is defined by the recurrence relation:

F n = F n-1 + F n-2, where F1 = 1 and F2 = 1.

Hence the first 12 terms will be:

F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 F6 = 8 F7 = 13 F8 = 21 F9 = 34 F10 = 55 F11 = 89 F12 = 144

The 12th term, F12, is the first term to contain three digits.

What is the first term in the Fibonacci sequence to contain 1000 digits?

My solution was to simply calculate Fibonacci numbers until one was 1,000-digits long.

using System;
using System.Numerics;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Problem025
{
    class Program
    {
        static void Main(string[] args)
        {
            BigInteger fib1 = new BigInteger(1);
            BigInteger fib2 = new BigInteger(1);
            BigInteger nextFib = new BigInteger(0);
            int fibSeqNum = 2;

            while (nextFib.ToString().Length < 1000)
            {
                nextFib = fib1 + fib2;
                fib1 = fib2;
                fib2 = nextFib;
                fibSeqNum++;
            }

            Console.WriteLine(fibSeqNum);
        }
    }
}