I have given all computer science genii a challenge. It is so impossible it is possible. You have to write codes that can do the following things:
(a) Be able to print the Riemann zeta function of any number.
(b) Be able to print off the first 10000 primes without using the Sieve of Eratosthenes
(c) (extension) Be able to print numbers in exact values for (a). e.g.
You can write in any language. Special prize for the winner, which will be said after the challenge has been completed.
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
Challenge (b) in python.
EDIT
Here is a straight forward way of generating primes without a sieve.For each N,check if any of the primes <N you previously generated divide it. If they do not,then it is a prime and you can add it to the list of primes and print it out.
Another way of solving this problem is by going through each number and then use a very fast primality testing algorithm such as Miller Rabin to check for primality.
In Java:
Log in to reply
when internet is down, try to print with it.. :D
Log in to reply
ur right..was a bit lazy..Ive added more
Nice.
For (a), Im using JavaScript
Im not very good at JavaScript, so, this may not be the most efficient way to calculate the required value, but this does give an approximation for the Riemann Zeta of a number
Log in to reply
Run the code on the console of any browser, or just make a HTML file that links to the javascript file which contains the above code..
Look at this.
Log in to reply
Thanks a lot...I have edited the comment using the method suggested there...
Printing first 10000 primes -
What does problem (c) mean?
Log in to reply
Read it again, I edited it.
Log in to reply
extension means web extension?
Log in to reply
Log in to reply
Log in to reply
Log in to reply
Log in to reply
π, it shows it as the string value assigned to pi. If it has lots o digits, give it in the form of an equation.
When I said exact values, if it has infinite digits likeLog in to reply
Log in to reply
Minor typo - in (c) it has to be π2/6
Log in to reply
Well, it is an example, not the zeta function answer.
Log in to reply
For instance,
ζ(−19.9960230838937361197456702051425768393)≈6π
(a), (b) and (c) using Mathematica (and I think I could solve them using Sage too).
Anyway, do not take this solution into consideration (as if you would), because it is ridiculously unfair with who is using Python, C, C#, Java, Haskell, ... to solve it.
Code for a) & b)