![]() |
|
|
#23 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36·13 Posts |
n=270, a prp11150 - attached.
|
|
|
|
|
|
#24 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
100101000001012 Posts |
a prp15046 (n=314)
|
|
|
|
|
|
#25 |
|
Jun 2003
13BB16 Posts |
|
|
|
|
|
|
#26 |
|
"Forget I exist"
Jul 2009
Dumbassville
20C016 Posts |
well one thing the amount of primes depends on is how many permutations that end in 1 there are. since 1=2^0 we can use n! to figure out how many permutations there are of the remaining elements. as for if they are prime I haven't got that far.
|
|
|
|
|
|
#27 |
|
Aug 2006
3×1,993 Posts |
I discuss this in post #16. There are (n-1)! permutations that result in a number coprime to 10, making the 'chance' that an individual number is prime about 2.5 times more likely than a standard number that size, which is ~ 1/log(2^(n^2)). Thus the expected number of primes is something like 2.5 * n! / log 2 / n^3.
Last fiddled with by CRGreathouse on 2011-02-09 at 18:58 |
|
|
|
|
|
#28 | |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
Quote:
|
|
|
|
|
|
|
#29 | |
|
Undefined
"The unspeakable one"
Jun 2006
My evil lair
22×1,549 Posts |
Quote:
Last fiddled with by retina on 2011-02-09 at 19:16 |
|
|
|
|
|
|
#30 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
Code:
(13:29)>p2=vector(100,n,sumdigits(2^n)) %21 = [2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, (15:12)>x6=vector(100,x,sumdigits(6*x+1)) %22 = [7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, 1, 7, 4, (15:12)>x6=vector(100,x,sumdigits(6*x-1)) %23 = [5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 8, 5, 2, 1 fits into the 1,2,4,5,7,8 1+2=3 doesn't fit in 1+2+4 = 7 fits 1+2+4+8 = 15(1+5) = 6 doesn't 1+2+4+8+7 = 22(2+2) = 4 fits 1+2+4+8+7+5 = 27 = 0 doesn't the pattern repeats. |
|
|
|
|
|
#31 |
|
Aug 2006
10111010110112 Posts |
|
|
|
|
|
|
#32 | |
|
Aug 2006
3·1,993 Posts |
Quote:
Code:
try(n)=my(t);n--;for(k=1,n!,if(ispseudoprime(t=glue(round(2^numtoperm(n,k)))*10+1),return(t))) |
|
|
|
|
|
|
#33 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
250516 Posts |
I used perl to manipulate strings (pregenerated with BigInt), sans '1'. With an array of strings, just swap two random strings at a time, concat (with '1' at end) and pipe into pfgw. Just my 2c.
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Digit strings containing primes | davar55 | Puzzles | 13 | 2018-03-15 14:46 |
| Sieving with powers of small primes in the Small Prime variation of the Quadratic Sieve | mickfrancis | Factoring | 2 | 2016-05-06 08:13 |
| Bashing Strings Parsimoniously in Linux | EdH | Programming | 15 | 2013-05-06 11:04 |
| ubasic question - strings | Andi47 | Programming | 5 | 2008-12-28 05:52 |
| Strings of Digits | davar55 | Puzzles | 5 | 2008-11-02 00:08 |