![]() |
|
|
#683 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
scratch f we can just use v=f to redefine it back to v after.
|
|
|
|
|
|
#684 | |
|
Aug 2006
3×1,993 Posts |
Quote:
Code:
concat([1,2,3],10) |
|
|
|
|
|
|
#685 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
I'm an idiot thanks.
|
|
|
|
|
|
#686 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
What is supposed to be the substitution here? |
|
|
|
|
|
|
#687 |
|
Aug 2006
10111010110112 Posts |
|
|
|
|
|
|
#688 |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
A 1 in 1065 chance:
I entered a(65), which is nextprime(random(10^65)). The result: 2. |
|
|
|
|
|
#689 |
|
Aug 2006
135338 Posts |
Well, 3 in 10^65 anyway. Wow.
|
|
|
|
|
|
#690 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
I entered a(7) and got 2, 6 times in a row. I tried a(8) through a(12), and got 2, about 20 times on end. This would normally happen only about 1 in ≈10163 times. I'm going with PARI being a bit buggy. Or did I have a supreme stroke of luck and just defy odds of 1 in 10163? Also: The lottery should be changed to guessing 10 random numbers between 1 and 1015. (To ensure that nobody wins, )
Last fiddled with by 3.14159 on 2010-08-19 at 19:07 |
|
|
|
|
|
|
#691 |
|
Aug 2006
3×1,993 Posts |
You may have inadvertently overwritten a. Try ?a to see the current definition.
|
|
|
|
|
|
#692 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#693 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
Code:
(15:27) gp > v=vector(1,n,0);a=1;for(x=1,10000,if(isprime(x),v[a]=x;concat(v[],0);a=a+1))
*** unused characters: v=vector(1,n,0);a=1;for(x=1,10000,if(is
^--------------------
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |