Skip to content

Instantly share code, notes, and snippets.

View larryv's full-sized avatar

Lawrence Velázquez larryv

View GitHub Profile
#!/usr/bin/env ruby1.9
# Project Euler, Problem 52
#
# It can be seen that the number 125874, and its double, 251748, contain
# exactly the same digits, but in a different order.
#
# Find the smallest positive integer x such that 2x, 3x, 4x, 5x, and 6x
# contain the same digits.
#
/*
Project Euler, Problem 14
The following iterative sequence is defined for the set of positive
integers:
n -> n / 2 (n is even)
n -> 3n + 1 (n is odd)
Using the rule above and starting with 13, we generate the following
#!/usr/bin/env ruby1.9
# Project Euler, Problem 14
#
# The following iterative sequence is defined for the set of positive
# integers:
#
# n -> n / 2 (n is even)
# n -> 3n + 1 (n is odd)
#
#!/usr/bin/env python3.2
import csv
import datetime
import glob
import io
import os
import os.path
import sys
import tempfile