mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2018-03-02, 13:57   #1
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

1,451 Posts
Default 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
pepi37 is offline   Reply With Quote
Old 2018-03-02, 14:23   #2
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by pepi37 View Post
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).
science_man_88 is offline   Reply With Quote
Old 2018-03-02, 14:41   #3
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

145110 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
A for loop in pari gp ? You can also generate random numbers in a range using an until loop and random(n).
Please write example
Thanks
pepi37 is offline   Reply With Quote
Old 2018-03-02, 14:50   #4
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

On the face of it, your question seems slightly insane. There isn't enough space on your hard drive to store 10^35 numbers.
Dubslow is offline   Reply With Quote
Old 2018-03-02, 15:01   #5
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

26538 Posts
Default

Quote:
Originally Posted by Dubslow View Post
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 :-)
pepi37 is offline   Reply With Quote
Old 2018-03-02, 15:06   #6
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

Quote:
Originally Posted by pepi37 View Post
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
science_man_88 is offline   Reply With Quote
Old 2018-03-02, 15:14   #7
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

22·727 Posts
Default

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"
kar_bon is offline   Reply With Quote
Old 2018-03-02, 15:30   #8
S485122
 
S485122's Avatar
 
"Jacob"
Sep 2006
Brussels, Belgium

3·569 Posts
Default

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
File Type: 7z 800000000000000000.7z (9.1 KB, 112 views)

Last fiddled with by S485122 on 2018-03-02 at 15:31
S485122 is offline   Reply With Quote
Old 2018-03-02, 15:41   #9
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100101000110012 Posts
Default

Code:
ABC2 800000000000000000+$a
a: from 0 to 25
Replace 800000000000000000 with whatever you want.
Batalov is offline   Reply With Quote
Old 2018-03-02, 16:14   #10
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

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
CRGreathouse is offline   Reply With Quote
Old 2018-03-02, 16:50   #11
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

1,451 Posts
Default

Thanks to all, Excel mask works perfectly!
pepi37 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Factor a 108-digit number sweety439 Factoring 9 2016-12-21 21:22
10 digit number puzzle MattcAnderson Puzzles 13 2014-11-10 18:03
Factoring a 617-digit number? Shakaru Factoring 2 2005-02-23 19:22
100 MILLION DIGIT NUMBER lpmurray Software 8 2004-05-31 19:22
10,000,000 digit number Unregistered Software 3 2004-03-03 19:20

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


Thu Aug 5 01:17:59 UTC 2021 up 12 days, 19:46, 0 users, load averages: 3.83, 3.79, 3.75

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.