mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Miscellaneous Math (https://www.mersenneforum.org/forumdisplay.php?f=56)
-   -   F = (n^2+n+41*n)/n (https://www.mersenneforum.org/showthread.php?t=23940)

Godzilla 2018-12-27 10:10

F = (n^2+n+41*n)/n
 
Good morning ,

F=(n^2+n+41*n)/n

Up to 100 numbers found 29 prime numbers
Up to 1000 numbers found 295 prime numbers
Up to 10000 numbers found 2952 prime numbers

and so..

Found it...but is too simple...

[CODE]

aa=1
ii=1
i2=0
GG=0
FF=0
VV =0
e = 0
AA=0
c = 1
a =3
bb=0
dd=0
I=1
II=0
i=1
i1=0
b=0
p=1
equTwo =0
mod=0
equ=0
moda=0
print('Helloword \n\n');
bb=input('Inserire numero: ')

while p<=bb:

equTwo= (p**2+p+41*p)/p





print(' N= ---->' , p)
print(' FUNC= ---->' , equTwo)



while I<=p:


I=I*1
I=I+1
if p==I :

print(' E un numero primo -----', p)
AA=AA+1
break

if p%I==0 :
break

while II<=equTwo:


II=II*1
II=II+1
if equTwo==II :

print(' Func e un numero primo -----', equTwo)
moda=moda+1
break

if equTwo%I==0 :
break





p=p+1
aa=aa+1
I=1
II=1






print('\n\n\nTOTALE NUMERI PRIMI TROVATI : ',AA)
print('\n\n\nTOTALE NUMERI FUNC TROVATI : ',moda)



[/CODE]

axn 2018-12-27 10:13

[QUOTE=Godzilla;504093]F=(n^2+n+41*n)/n[/QUOTE]
You mean F=n+42 ?!

Godzilla 2018-12-27 10:25

[QUOTE=axn;504094]You mean F=n+42 ?![/QUOTE]


I did not notice, thanks.

Batalov 2018-12-27 16:02

42 is indeed "the Answer to the Ultimate Question of Life, the Universe, and Everything"

retina 2018-12-27 16:07

[QUOTE=Godzilla;504093][CODE]aa=1
ii=1
i2=0
GG=0
FF=0
VV =0
e = 0
AA=0
c = 1
a =3
bb=0
dd=0
I=1
II=0
i=1
i1=0
b=0
p=1
equTwo =0
mod=0
equ=0
moda=0[/CODE][/QUOTE]Naming things is hard. So let's just give up trying and instead make names that have no meaning at all. Then all of our programs will be [i]so easy[/i] to understand. :no:

LaurV 2018-12-28 05:03

[QUOTE=Godzilla;504093]
Up to 100 numbers found 29 prime numbers
Up to 1000 numbers found 295 prime numbers
Up to 10000 numbers found 2952 prime numbers
[/QUOTE]

WOW! This actually finds more primes than they are! Especially to 100, as there are only 25 primes, starting from 2. He starts from 42 and still finds 29...
(for the records, even going to "next 100 after 42", there are only 21 primes from 42 to 142, which can be counted with a simple pari command)

In fact (CRG can weight in here) we thing that if you find 29 primes in a 100 numbers interval, you are a good candidate for some Nobel Award, or so.. :razz:
Thee is some theorem somewhere which says that prime constellations are denser "downstairs" than in the sky... The maximum you ever get in a 100 interval should be from 2 to 101 (26 primes). In fact, [41,140] should be the highest known 100-large interval that has 22 primes, I don't think that such density occurs higher, and all the higher intervals could only have 21 primes or less.

[QUOTE]
[CODE]
...
I=1
II=1
...
print('Helloword \n\n');
...
while I<=p:
...
I=I*1
...
II=II*1
...
I=1
II=1
...
[/CODE][/QUOTE] Well.. wow... quite a complex calculus with that I and II...
I said before: this guy is either only trolling or he is a completely moron.

science_man_88 2018-12-28 09:47

[QUOTE=LaurV;504188]WOW! This actually finds more primes than they are! Especially to 100, as there are only 25 primes, starting from 2. He starts from 42 and still finds 29...
(for the records, even going to "next 100 after 42", there are only 21 primes from 42 to 142, which can be counted with a simple pari command)

In fact (CRG can weight in here) we thing that if you find 29 primes in a 100 numbers interval, you are a good candidate for some Nobel Award, or so.. :razz:
Thee is some theorem somewhere which says that prime constellations are denser "downstairs" than in the sky... The maximum you ever get in a 100 interval should be from 2 to 101 (26 primes). In fact, [41,140] should be the highest known 100-large interval that has 22 primes, I don't think that such density occurs higher, and all the higher intervals could only have 21 primes or less.

Well.. wow... quite a complex calculus with that I and II...
I said before: this guy is either only trolling or he is a completely moron.[/QUOTE]

he could mean 100 values in the sequence.

CRGreathouse 2018-12-28 16:54

[QUOTE=LaurV;504188]In fact (CRG can weight in here) we thing that if you find 29 primes in a 100 numbers interval, you are a good candidate for some Nobel Award, or so.. :razz:[/QUOTE]

You could at least check in with [url=https://www.improbable.com/]Improbable Research[/url].

LaurV 2018-12-29 08:29

grr.. clicked on the link, and hit their editorial, finding out that [URL="https://www.improbable.com/2018/12/27/sad-news-roy-glauber-paper-airplane-sweeper-and-physicist-of-light-is-gone/"]Roy Glauber[/URL] died... We didn't know about him and never heard his name before, but we love him already... Rest in peace!

Dr Sardonicus 2018-12-29 14:45

[QUOTE=science_man_88;504197]he could mean 100 values in the sequence.[/QUOTE]
Well, if he's using the famous x^2 + x + 41 at integer values of x, the poor fellow is dropping primes right and left. A simple-minded Pari-GP script gives the following results:

[code]? c=0;print(terms" #primes");for(i=1,1000,n=i^2+i+41;if(isprime(n),c++);if(i%100==0,print(i" "c)))
terms #primes
100 86
200 156
300 210
400 270
500 325
600 382
700 431
800 478
900 531
1000 581
[/code]

The sequence is apparently "prime-rich," due in no small part to the fact that

(-163/p) = -1, for every prime from p = 2 to p = 37.

This means that none of these primes divide any term of the sequence.

science_man_88 2018-12-29 15:10

[QUOTE=Dr Sardonicus;504274]Well, if he's using the famous x^2 + x + 41 at integer values of x, the poor fellow is dropping primes right and left. A simple-minded Pari-GP script gives the following results:

[code]? c=0;print(terms" #primes");for(i=1,1000,n=i^2+i+41;if(isprime(n),c++);if(i%100==0,print(i" "c)))
terms #primes
100 86
200 156
300 210
400 270
500 325
600 382
700 431
800 478
900 531
1000 581
[/code]

The sequence is apparently "prime-rich," due in no small part to the fact that

(-163/p) = -1, for every prime from p = 2 to p = 37.

This means that none of these primes divide any term of the sequence.[/QUOTE]

well n+42 means that they'd be counting from 43 to 142 but if only considering odd n then that number flies to 40 primes in the gap 43 to 242. using only prime pairs (p,p+42) takes from 1 to 229.


All times are UTC. The time now is 06:54.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.