Prime-generating fractions
johndcook.com
Prime-generating fractions
1–10 of 11 posts
Re: Prime-generating fractions
#2D=0
SUM=0
for n:
D += num_digits(PRIME[N]) // +1 for a nice single 0 between them
SUM += PRIME[n]/(10^D)
print fraction(SUM)Re: Prime-generating fractions
#3Re: Prime-generating fractions
#4The way this is constructed is interesting, but it doesn't appear that a real sequence to generate primes is required, just a list of them: D=0 SUM=0 for n: D += num_digits(PRIME[N]) // +1 for a nice single 0 between them SUM += PRIME[n]/(10^D) print fraction(SUM)
It seems the really difficult part is finding a good simple fraction to express the string. Perhaps that's the key here. maybe the primes summed in the sequences are a subset that produces a relatively simple fractional representation.
Re: Prime-generating fractions
#5Re: Prime-generating fractions
#6The way this is constructed is interesting, but it doesn't appear that a real sequence to generate primes is required, just a list of them: D=0 SUM=0 for n: D += num_digits(PRIME[N]) // +1 for a nice single 0 between them SUM += PRIME[n]/(10^D) print fraction(SUM)
Re: Prime-generating fractions
#7The way this is constructed is interesting, but it doesn't appear that a real sequence to generate primes is required, just a list of them: D=0 SUM=0 for n: D += num_digits(PRIME[N]) // +1 for a nice single 0 between them SUM += PRIME[n]/(10^D) print fraction(SUM)
This method results in much shorter numerators and denominators than the list of primes it generates. Simplifying this fraction only chops off 2 or so digits on average.
------------------->http://www.works23.com
Re: Prime-generating fractions
#8The way this is constructed is interesting, but it doesn't appear that a real sequence to generate primes is required, just a list of them: D=0 SUM=0 for n: D += num_digits(PRIME[N]) // +1 for a nice single 0 between them SUM += PRIME[n]/(10^D) print fraction(SUM)
so, you could even skip the math and just append the string representations of the primes. It seems the really difficult part is finding a good simple fraction to express the string. Perhaps that's the key here. maybe the primes summed in the sequences are a subset that produces a relatively simple fractional representation.
See for example http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci... or http://www.math.sunysb.edu/~tony/whatsnew/column/irrational-...
Re: Prime-generating fractions
#9Re: Prime-generating fractions
#10Okay. Very interesting. For those who don't understand like me, what is the technical use of this? Where will this be used? Are we somehow going to use this in cryptography?
As it stands, it's just a fun mathematical curiosity.