![]() |
|
|
#12 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
Code:
13-> 10000000000000111111111111122222222222223333333333333444444444444455555555555556666666666666777777777777788888888888988999999999999 14-> ... gets only easier it seems ... ... 20-> 100000000000000000000111111111111111111112222222222222222222233333333333333333333444444444444444444445555555555555555555566666666666666666666777777777777777777778888888888888888889899999999999989999999 Last fiddled with by Batalov on 2010-12-22 at 06:21 |
|
|
|
|
|
#13 |
|
Feb 2006
Denmark
E616 Posts |
The below is based on proven primes. Most of the time was used on proofs. It only lists the last digits from the point where they deviate from the smallest possible number. After the first 5 terms there are only a few 8's deviating into the 9's. A more compressed format could simply have listed the positions of the deviating 8's.
Code:
1 -> 7689 2 -> 877989 3 -> 8978989 4 -> 98889989 5 -> 989998889 6 -> 98999899 7 -> 999898999 8 -> 9899999989 9 -> 9999899999 10 -> No deviation 11 -> 99899999898999 12 -> 99999989999989 13 -> 988999999999999 14 -> 9999999998999899 15 -> 9989999999999999 16 -> 98999999999999999 17 -> 989999999999999999 18 -> 9999998999999999999 19 -> 999989999999999899999 20 -> 9899999999999989999999 21 -> 98999899999999999999999 22 -> No deviation 23 -> 999999999999998999999999 24 -> 99999899999998999999999999 25 -> 989999999989999999999999999 26 -> 999999999999999989999999999 27 -> 99999989998999999999999999999 28 -> 9889999899999999999999999999999 29 -> 9998899999999999999999999999999 30 -> 99899999999999999999999998999999 31 -> 989998999999999999999999999999999 32 -> 9899999999999999999999999999999989 33 -> 99999899999999989999999999999999999 34 -> 999999999899999999998999999999999999 35 -> 9999989999999999999998999999999999999 36 -> 9999999999999989999999999999999999999 37 -> 999999899989999999999999999999999999999 38 -> 9989899999999999999999999999999999999999 39 -> 98999999999999999999999999989999999999999 40 -> 999999989999999999999899999999999999999999 41 -> 9989999999999999999999999899999999999999999 42 -> 99989999999999999999899999999999999999999999 43 -> 99999899999999999999999999999999999999999999 44 -> 9998999999999999999999999999999999999999989999 45 -> 99999899999999999999999999999999999998999999999 46 -> 989999999999999999999999999999999999999999998999 47 -> 9999999999999989999999999999999999989999999999999 48 -> 99899999999999999999999999989999999999999999999999 49 -> 999999899999999999999999999999999999999999999989999 50 -> 9999989999999989999999999999999999999999999999999999 51 -> 98999999999999999999999999999999999999999999999999989 52 -> 99999999999999999999999999999999999999999999999989999 53 -> 999999999998999999999999999999999999999999999999999999 54 -> 99899999999999999999999899999999999999999999999999999999 55 -> 999998999999999999999999999999999999999999999999999899999 Code:
ABC2 10^($a*10)+((10^($a*10)-1)/(10^$a-1)-10)/9 a:from 5001 to 6000 |
|
|
|
|
|
#14 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
Code:
99-> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999899999999999 For large lengths, permuting just one or two 'eights' into 'nines' should be enough asymtotically, n'est ce pas? perl + pfgw + Primo (for large lengths) Code:
#!/usr/bin/perl -w
$n=(shift or 10); # 10 and 22 are magic - they will have the very first candidate prime
print 'ABC $a // {number_primes,$a,1}',"\n";
for($i=0;$i<$n;$i++) {
$s="1";
for($k=0;$k<=9;$k++) { $s.="$k"x$n }
substr($s,9*$n,1)="9";
substr($s,9*$n+$i,1)="8";
print $s,"\n";
}
#for($i=0;$i<$n;$i++) {
for($i=0;$i<10;$i++) { # should be enough candidates
for($j=$i+1;$j<$n;$j++) {
$s="1";
for($k=0;$k<=9;$k++) { $s.="$k"x$n }
substr($s,9*$n-1,2)="99";
substr($s,9*$n+$i,1)="8";
substr($s,9*$n+$j,1)="8" if $i;
print $s,"\n";
}
}
Code:
300-> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899999999989999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999989999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 Last fiddled with by Batalov on 2010-12-22 at 08:52 |
|
|
|
|
|
#15 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
947710 Posts |
Timeout. Cannot edit that faulty script above - disregard it (it has a typo).
Here's a better shot and the 500-er output (you run pfgw -f -l on the output file): Code:
#!/usr/local/bin/perl -w
$n=(shift or 10); # 10 and 22 are magic - they will have the very first candidate prime
print 'ABC $a // {number_primes,$a,1}',"\n";
for($i=-1;$i<$n;$i++) {
for($j=$i+1;$j<$n;$j++) {
$s="1";
for($k=0;$k<=9;$k++) { $s.="$k"x$n }
substr($s,9*$n-1,2)="99";
substr($s,9*$n+$i,1)="8";
substr($s,9*$n+$j,1)="8";
print $s,"\n";
}}
Code:
500-> 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444445555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555566666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777778888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999989999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 |
|
|
|
|
|
#16 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
250516 Posts |
Code:
1000-> "10^10000+((10^10000-1)/(10^1000-1)-10)/9+109*10^999-10^974" |
|
|
|
|
|
#17 |
|
Feb 2006
Denmark
2·5·23 Posts |
|
|
|
|
|
|
#18 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
Code:
2000-> "10^20000+((10^20000-1)/(10^2000-1)-10)/9+10^2001-10^696" Code:
ABC2 10^($a*10)+((10^($a*10)-1)/(10^$a-1)-10)/9 a:from 5001 to 5625 => all composite |
|
|
|
|
|
#19 |
|
Feb 2006
Denmark
2·5·23 Posts |
Term 10, 22, 3270 were the only primes or prp's up to 5000.
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiply By Drawing Lines | petrw1 | Math | 2 | 2014-05-20 06:13 |
| Sequences using nine-digit pandigital numbers as start | ChristianB | Aliquot Sequences | 16 | 2014-05-16 06:56 |
| Multiply Pandigital 2 | davar55 | Puzzles | 3 | 2013-01-07 20:23 |
| Multiply | mgb | Lounge | 0 | 2008-07-28 12:54 |
| Critical bug in Gnu MP FFT-multiply code | ET_ | Lounge | 3 | 2004-03-11 16:24 |