Skip to content
{{ message }}

Instantly share code, notes, and snippets.

# /pi from factorial and root of 3

Created Jan 6, 2018
this is a code to generate a list of integers using only nests of the operations: factorial, square-root and floor, on the number 3. Also, finds a pair of the integers which approximates pi.
 import math as m L=[(3,'3',0,'n')] #list of values attainable with nested roots and factorials #the first 3 is the value of the element, the string '3' is the path from 3 to that number, the 0 is the length of the path from 3 to that number, the n indicates that the element hasn't yet been rooted or factorial'ed M=[] #temporary storage to be integrated into L in order to see which elements have been used in each pass i=1 #index of number of passes over L n=5000 #number of passes over L (with each pass, the current numbers in L are rooted or factorial'ed) NS=10**100 #upper limit of numbers for square rooting NF=1000 #upper limit of numbers for factorial'ing while i
to join this conversation on GitHub. Already have an account? Sign in to comment