Ask Your Question

Prime Numbers in Calc [closed]

asked 2012-05-21 05:16:21 +0200

ProLogic gravatar image

updated 2012-05-21 05:18:15 +0200

is there a way to auto-fill column with only prime numbers in the same way as we auto-fill a column with "normal" numbers (like starting to write 1 in A1, 2 in A2, select with the mouse and extend the selection down to automatically fill A3, A4, A5 etc.... with the next following numbers) ?

  1. i need to fill up the first 2 000 prime numbers in calc, so i can't imagine to fill it up manually

Thank you for sharing your time

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-16 15:17:26.340466

1 Answer

Sort by » oldest newest most voted

answered 2012-06-06 15:09:31 +0200

JohnSUN gravatar image

No easy way to accomplish this task. You can try to write a macro that implements the algorithm "Sieve of Eratosthenes" and put the result of it's work in the table. However, it takes much more time than a simple Internet search on the string "all the prime numbers under 200000". So you can find, for example, the file that contains 78,498 Prime Numbers. You will only need to copy to your table the necessary number of values.

2000 Prime Numbers.ods

edit flag offensive delete link more


Thank you very much for your help

ProLogic gravatar imageProLogic ( 2012-08-19 03:47:45 +0200 )edit

Question Tools


Asked: 2012-05-21 05:16:21 +0200

Seen: 2,919 times

Last updated: Jun 06 '12