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.* \(\pi/6\)

You can write in any language. Special prize for the winner, which will be said after the challenge has been completed.

No vote yet

1 vote

×

Problem Loading...

Note Loading...

Set Loading...

Easy Math Editor

`*italics*`

or`_italics_`

italics`**bold**`

or`__bold__`

boldNote: you must add a full line of space before and after lists for them to show up correctlyparagraph 1

paragraph 2

`[example link](https://brilliant.org)`

`> This is a quote`

Remember to wrap math in \( ... \) 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

Sort by:

TopNewestChallenge

(b)in python.EDITHere is a straight forward way of generating primes without a sieve.For each \(N\),check if any of the primes \(< \sqrt{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

Nice.

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

Log in to reply

Printing first 10000 primes -

Log in to reply

For (a), Im using

JavaScriptIm 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

Look at this.

Log in to reply

Thanks a lot...I have edited the comment using the method suggested there...

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..

Log in to reply

\[ Code for a) & b) \]

Log in to reply

(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.

Log in to reply

Minor typo - in (c) it has to be \(\pi^2/6\)

Log in to reply

Well, it is an example, not the zeta function answer.

Log in to reply

For instance,

\[\zeta{\left(-19.9960230838937361197456702051425768393\right)}\approx{}\frac{\pi{}}{6}\]

Log in to reply

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

Log in to reply

Imgur

Log in to reply

Log in to reply