Liste des Groupes | Revenir à cl c++ |
Am 19.08.2024 um 22:34 schrieb Vir Campestris:If I call my program with "1000000000 primes.txt" the prime 999999937On 16/08/2024 18:35, Bonita Montero wrote:I simply printed primes up to a billion and chose the last numer andBut basically I don't think it is a good idea to skip numbers exept>
multiples of two. With the three you save a sixth of memory, with
the five you save a 15-th and at the end you get about 20% less
storage (1 / (2 * 3) + 1 / (2 * 3 * 5) + 1 / (2 * 3 * 5 * 7) ...)
for a lot of computation. That's the point where I dropped this
idea and I think this extra computation is higher than the time
for the saved memory loads.
BTW I was just checking outputs.
>
66049
67591
69133
69647
71189
72217
72731
75301
78899
79927
80441
81469
85067
86609
89179
89693
90721
92263
94319
95861
97403
98431
99973
>
all show in the output for your program, but not mine. I think you'll find they are products of 257 and the next few primes.
looked in the internet if this is really the n-th prime according to
my count function (second parameter is "*").
Les messages affichés proviennent d'usenet.