mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2010-12-22, 06:04   #12
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

Code:
13-> 10000000000000111111111111122222222222223333333333333444444444444455555555555556666666666666777777777777788888888888988999999999999
14-> ... gets only easier it seems
...
...
20-> 100000000000000000000111111111111111111112222222222222222222233333333333333333333444444444444444444445555555555555555555566666666666666666666777777777777777777778888888888888888889899999999999989999999

Last fiddled with by Batalov on 2010-12-22 at 06:21
Batalov is offline   Reply With Quote
Old 2010-12-22, 07:23   #13
Jens K Andersen
 
Jens K Andersen's Avatar
 
Feb 2006
Denmark

2×5×23 Posts
Default

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
I stopped at 55. Term 10 and 22 are the only with no deviation among the first 1700 terms. I will continue to 5000. If somebody wants to do more then here is PFGW input:
Code:
ABC2 10^($a*10)+((10^($a*10)-1)/(10^$a-1)-10)/9
a:from 5001 to 6000
Jens K Andersen is offline   Reply With Quote
Old 2010-12-22, 08:01   #14
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

Code:
99-> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999899999999999
(proven)
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
(this one will take a bit of time with Primo)

Last fiddled with by Batalov on 2010-12-22 at 08:52
Batalov is offline   Reply With Quote
Old 2010-12-22, 09:21   #15
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

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
(a 5001-digit PRP)
Batalov is offline   Reply With Quote
Old 2010-12-22, 10:52   #16
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

947710 Posts
Default

Code:
1000-> "10^10000+((10^10000-1)/(10^1000-1)-10)/9+109*10^999-10^974"
(I am not attempting Primo on this one; be my guest; submitted to http://www.primenumbers.net/prptop/ as a 10001-digit PRP)
Batalov is offline   Reply With Quote
Old 2010-12-22, 15:03   #17
Jens K Andersen
 
Jens K Andersen's Avatar
 
Feb 2006
Denmark

2·5·23 Posts
Default

Quote:
Originally Posted by Jens K Andersen View Post
Term 10 and 22 are the only with no deviation among the first 1700 terms.
The next is a probable prime in term 3270:
10^32700+((10^32700-1)/(10^3270-1)-10)/9 is Fermat and Lucas PRP! (534.7103s+0.0111s)
Jens K Andersen is offline   Reply With Quote
Old 2010-12-22, 21:53   #18
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

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
Batalov is offline   Reply With Quote
Old 2010-12-22, 22:07   #19
Jens K Andersen
 
Jens K Andersen's Avatar
 
Feb 2006
Denmark

2·5·23 Posts
Default

Term 10, 22, 3270 were the only primes or prp's up to 5000.
Jens K Andersen is offline   Reply With Quote
Reply



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

All times are UTC. The time now is 00:19.


Sat Jul 17 00:19:38 UTC 2021 up 49 days, 22:06, 1 user, load averages: 1.63, 1.60, 1.58

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.