Your program should output the described sequence for primes from 3 to n.
After the sequence has been printed, print the maximum value in the sequence,
the minimum value in the sequence, the most commonly occurring value in the sequence (mode) (multiple if there is a tie), and the largest integer gap between consecutive terms in the sequence.

Well I decided to give this problem a go in Python to see if I am actually learning anything from the last 2 days lol and because you didn't give a language restriction for this problem ;p.

Anyways here is my attempt, it seems to be working though I didn't do much testing on it since it is 5:30am and I just want to head to bed. It does run quite slowly if you get to numbers above 100k though but that is ok for now I will make it more efficient tomorrow.

Fixed my solution to output the correct values for mode. Now working on the performance a bit (Though it runs pretty fast now for numbers up to a few million or so), and adding in some fun tricks to make it more elegant ;p Though I gotta look up some more features of Python first :(