You've done well so far user, but how about you sum all primes under 2 million now?

>you've done well so far user, but how about you sum all primes under 2 million now?

Other urls found in this thread:

primes.utm.edu/notes/faq/one.html
primos.mat.br/dados/50M_part1.7z
twitter.com/NSFWRedditImage

>Sudo apt-get primesumerunder2million

Sto 0x
Sto 2000000y
LBL 1
If x

Im drunk sue me

SIFT THE TWOS
SIFT THE THREES
THE SIEVE OF ERATOSTHENES
WHEN THE MULTIPLES SUBLIME
THE NUMBERS THAT REMAIN THAN PRIME

Use Wikipedia faggot. Literally fizzbuzz level 2.

>sum all primes under 2 mil
>fizzbuzz
>reverse binary tree

It's not fucking fair

P versus NP
Hodge conjecture
Riemann hypothesis
Yang–Mills existence and mass gap
Navier–Stokes existence and smoothness
Birch and Swinnerton-Dyer conjecture

sure, should i do that in my head or do you want the pc to do that?

Just memorize this. Ezpz.

#include
#include

#define BELOW 2000000

int isaprime (int num);

int main (void) {

int i;
float sum = 0;

for (i = 2; i < BELOW; i++) {

if (isaprime(i) == 1) {
sum = sum + i;
printf ("\n%d\t%.1f", i, sum);
}
}

getch();
return 0;
}

int isaprime (int num) {

int i;

for (i = 2; i

1999957 142909964288.0
1999969 142911963136.0
1999979 142913961984.0
1999993 142915960832.0
Process returned 0 (0x0) execution time : 2.205 s
Press ENTER to continue.

Thank you!

what time is it by you.
what made you drunk shitpost user?

>2 is the only even prime
>All printed sums are even
This generation is lost

odd + odd can be even bitch

you are lost

Which means every other sum must be even and every other odd. All the summs 142909964288.0, 142911963136.0, 142913961984.0 and 142915960832.0 are all even.

How about you go fuck yourself, senpai.

Result for 2 hundred million:

199999903 1074933341880320.0
199999931 1074933543206912.0
199999949 1074933744533504.0
199999957 1074933945860096.0
199999963 1074934147186688.0
199999991 1074934348513280.0
Process returned 0 (0x0) execution time : 964.568 s
Press ENTER to continue.

Code from:

It got evens too

BUT WHY DOES IT DO THAT?!

Scala, minimizing (dev time + runtime)
given a bigger N, it'd make sense to put a bit more effort into efficiency
def fsqrt(n: Long) = math.floor(math.sqrt(n)).toLong

def isPrime(n: Long) = (2L to fsqrt(n)) forall {n % _ != 0}

(1L to 2*1000*1000L) filter(isPrime) sum

142 913 828 923

now let's schedule that interview
what do you mean by you don't have skype? Google Meet is not supported on WHAT browser? You don't have a G+ account to use hangouts?
Thanks for applying here user

I'm retarded
primes.utm.edu/notes/faq/one.html
>Why is the number one not prime?
updated sum:
142 913 828 922
wonder why I'm getting a different result from

yup, getting the same result via the primes in
primos.mat.br/dados/50M_part1.7z
so it looks like is wrong

hah, nice subtle bug with the float you did there
sneaky
for the folks playing at home, divergence from truth starts at 17669:
2028 17657 16765087
2029 17659 16782746
2030 17669 16800416

>964.568 s