mersenneforum.org > Math Generating from 16 to 35 digit number in row (+1)
 Register FAQ Search Today's Posts Mark Forums Read

 2018-03-02, 13:57 #1 pepi37     Dec 2011 After milion nines:) 101110011112 Posts Generating from 16 to 35 digit number in row (+1) Hi! What program I can use to generate such "big "numbers ? Excel round numbers if has above 16 digits, so it is not solution. And I dont need primes, I need all numbers. Thanks for any reply example 800000000000000000 800000000000000001 800000000000000002 800000000000000003 800000000000000004 etc etc Last fiddled with by pepi37 on 2018-03-02 at 13:57
2018-03-02, 14:23   #2
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts

Quote:
 Originally Posted by pepi37 Hi! What program I can use to generate such "big "numbers ? Excel round numbers if has above 16 digits, so it is not solution. And I dont need primes, I need all numbers. Thanks for any reply example 800000000000000000 800000000000000001 800000000000000002 800000000000000003 800000000000000004 etc etc
A for loop in pari gp ? You can also generate random numbers in a range using an until loop and random(n).

2018-03-02, 14:41   #3
pepi37

Dec 2011
After milion nines:)

1,487 Posts

Quote:
 Originally Posted by science_man_88 A for loop in pari gp ? You can also generate random numbers in a range using an until loop and random(n).
Thanks

 2018-03-02, 14:50 #4 Dubslow Basketry That Evening!     "Bunslow the Bold" Jun 2011 40
2018-03-02, 15:01   #5
pepi37

Dec 2011
After milion nines:)

1,487 Posts

Quote:
 Originally Posted by Dubslow On the face of it, your question seems slightly insane. There isn't enough space on your hard drive to store 10^35 numbers.
I need 2500 numbers , not all :-)

2018-03-02, 15:06   #6
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts

Quote:
 Originally Posted by pepi37 I need 2500 numbers , not all :-)
[1*10^15..1*10^15+2499] would have potential to work.

Last fiddled with by science_man_88 on 2018-03-02 at 15:20 Reason: Apparently e version doesn't work

 2018-03-02, 15:14 #7 kar_bon     Mar 2006 Germany B7016 Posts Using Excel: - column A (text-formatted) with "80000000000" (or your length/number you need) - column B (special format with leading zeros") with "0001" etc. - save as "prn"
2018-03-02, 15:30   #8
S485122

"Jacob"
Sep 2006
Brussels, Belgium

22·439 Posts

You can use Excel, but treat the numbers as strings,: concatenate the string "80000000000000" with the numbers from 0 to 2499 modified by a mask.
Put the numbers from 0 to 2499 in the A column and in the B1 cell ="80000000000000"&TEXT(A1;"0000"), then copy the formula down. (The 4 0's in the "0000" format string ensures you have the initial 0's and that all numbers have 4 digits.) Then it is an easy task to copy the result in a text file... (Unfortunately the name of function changes according to the language of the interface so if your Excel is in another language you will have to change the name of the function, f.i. in Spanish it is TEXTO() and in Italian TESTO().)

I just tested and it seems you can directly use the TEXT() function with the "800000000000000000" mask as in column C of the attached Excel spreadsheet.

Jacob
Attached Files
 800000000000000000.7z (9.1 KB, 133 views)

Last fiddled with by S485122 on 2018-03-02 at 15:31

 2018-03-02, 15:41 #9 Batalov     "Serge" Mar 2008 Phi(4,2^7658614+1)/2 259216 Posts Code: ABC2 800000000000000000+\$a a: from 0 to 25 Replace 800000000000000000 with whatever you want.
 2018-03-02, 16:14 #10 CRGreathouse     Aug 2006 3×1,993 Posts It's not clear what you mean. I'll give some examples in PARI/GP and you can pick whichever you think seem helpful. Loop from a 16-digit number to a 35-digit number, doing calculations along the way: Code: for(n=10^15, 10^35-1, if(Mod(2, n^2)^(n-1)==1, print(n))) \\ this won't finish before the sun swallows the earth Make a list of 2500 18-digit numbers: Code: v=[8*10^17..8*10^17+2499]; Make a list of random numbers with 16 to 25 digits: Code: v=vector(2500,i, [10^15,10^35-1]); Loop through numbers from 10^15 to roughly 10^35 in equal-sized steps, doing a calculation along the way: Code: s=0; forstep(n=10^15,10^35, 40016006402561024409363745498199, s+=sqrt(n)); s
 2018-03-02, 16:50 #11 pepi37     Dec 2011 After milion nines:) 1,487 Posts Thanks to all, Excel mask works perfectly!

 Similar Threads Thread Thread Starter Forum Replies Last Post sweety439 Factoring 9 2016-12-21 21:22 MattcAnderson Puzzles 13 2014-11-10 18:03 Shakaru Factoring 2 2005-02-23 19:22 lpmurray Software 8 2004-05-31 19:22 Unregistered Software 3 2004-03-03 19:20

All times are UTC. The time now is 17:17.

Mon Dec 6 17:17:34 UTC 2021 up 136 days, 11:46, 0 users, load averages: 2.09, 1.71, 1.63