# shreevatsa/misc-math

Some throwaway explorations, mostly mathematical
1. C 98.9%
2. Other 1.1%
C Other
Fetching latest commitâ€¦
Cannot retrieve the latest commit at this time.
 Failed to load latest commit information. euler_conjecture fluff inhodioapprox knowledge mse-1290948 .gitignore README adjacent-multiples.py bad_calculator.py balls-bins.c best_approximation.py candle-measure.py card-sum-mod.py cardguesswrong-old.py cardguesswrong.py ce2.c ce2.py continued_fraction.c dice-allnos.py dice-allnossim.py diophantine.java fillones.sage inhodioapprox-bf.cpp inhodioapprox-bf.py inhodioapprox.sage inhodioapprox.txt invertHashCode.py kth-combination.py log-convergence.py looksay.cpp mjd-puzzle-2.py mjd-puzzle.py monsters.sage mse-38671-triples.py mse-659036.hs permut-.....CCCCCC.cpp pigeonhole.cc powers-mse42420.py pypermutations.py ramanujan-houses.py rank-subsets.py so-21105154-partition.cc so-21105154.cc sums.cc typedef.cc wordlist-rev.py wordlist-rev.txt

```adjacent-multiples.py                   [MSE 46964] Sets S of n integers s.t. kS is consecutive modulo m.
bad_calculator.py                       Multiply keeping k bits of precision
best_approximation.py                   Brute-force solution to print all "best rational approximations"
cardguesswrong-old.py                   Older version of below.
cardguesswrong.py                       Dundee: guessing every card 'incorrectly' in a deck. Probability of succeeding.
continued_fraction-dw.py                From http://www.daniweb.com/code/snippet223956.html ; prints only convergents
continued_fraction.c                    "Best rational approximations" of a real number (plus a few extra ones TOFIX)
dice-allnos.py                          Expected no. of times to throw dice until all numbers 2 to 12 appear -- exact
dice-allnossim.py                       Expected no. of times to throw dice until all numbers 2 to 12 appear -- simul
diophantine.java                        Straightforward recursive solution to linear Diophantine equations
fillones.sage                           [MSE 47520] Expected time of a certain Markov chain
inhodioapprox-bf.cpp                    [MSE 46100] Powers of 2 starting with '2011'. Faster brute force.
inhodioapprox-bf.py                     [MSE 46100] Powers of 2 starting with '2011'. Brute force.
inhodioapprox.sage                      [MSE 46100] Inhomogeneous diophantine approximation in general.
inhodioapprox.txt                       [MSE 46100] List of those powers up to 1,000,000 (there are 216 of them).
kth-combination.py                      [MSE 36876] [SO 5878768] Print the kth combination of r letters.
looksay.cpp                             Testing a (wrong) heuristic about going backwards in the look-and-say sequence
mse-38671-triples.py                    [MSE 38671] Find triples that have the same sum and product.
permut-.....CCCCCC.cpp                  [MSE 36851] All permutations of ".....CCCCCC".
powers-mse42420.py                      [MSE 42420] When is first digit of 2^n and 5^n the same? And is it always 3?
pypermutations.py                       [SO 6534430] Compare three methods of generating all distinct permutations
tribonacci-period                       Period of Tribonacci sequence modulo m
```