![](/images/dot.gif)
Home > Numbers
Never prime! (2) (Posted on 2010-09-04) |
|
The value of the smallest positive base ten integer that cannot be changed into a prime by changing a single digit was determined in Never prime!.
Determine the respective minimum values of a positive base N integer P that cannot be changed into a prime
by changing a single digit, whenever N is a positive integer with 3 ≤ N ≤ 16, but N ≠ 10.
Note: P cannot contain any leading zero, and the first digit of P (reading left to right) cannot be changed to a zero.
solution and observations
|
| Comment 1 of 4
|
using mathematica I found the required smallest numbers, interesting result is that all of them are 3 digit numbers in the respective base. No suprise that they are not 1 or 2 digit numbers as that is impossible, but interesting that at least for values 3<=n<=50 there are none that require more than 3 digits. Another interesting pattern is that the last digit appears to always be zero. It would be nice to see a proof that these properties always hold true
below is my mathematica code used and its results
For[n=3,n„T50,++n,
num=2;
found=False;
While[!found,
dgs=IntegerDigits[num,n];
lng=Length[dgs];
pass=True;
If[!PrimeQ[num],
For[dp=1,dp„Tlng,++dp,
digit=dgs[[dp]];
For[d=0,d„Tn-1,++d,
If[d„jdigit,
If[!(dƒú0 && dpƒú1),
dgs2=dgs;
dgs2[[dp]]=d;
v=FromDigits[dgs2,n];
If[PrimeQ[v],
pass=False;
];
];
];
];
];
If[pass,
Print[n,": ",num," ",IntegerDigits[num,n]];
found=True;
];
];
++num;
];
];
3 : 24 {2,2,0}
4 : 24 {1,2,0}
5 : 90 {3,3,0}
6 : 90 {2,3,0}
7 : 119 {2,3,0}
8 : 200 {3,1,0}
9 : 117 {1,4,0}
10 : 200 {2,0,0}
11 : 319 {2,7,0}
12 : 528 {3,8,0}
13 : 1131 {6,9,0}
14 : 1134 {5,11,0}
15 : 525 {2,5,0}
16 : 1328 {5,3,0}
17 : 1343 {4,11,0}
18 : 1332 {4,2,0}
19 : 1330 {3,13,0}
20 : 1340 {3,7,0}
21 : 2478 {5,13,0}
22 : 7260 {15,0,0}
23 : 1334 {2,12,0}
24 : 5352 {9,7,0}
25 : 4300 {6,22,0}
26 : 5954 {8,21,0}
27 : 4833 {6,17,0}
28 : 13188 {16,23,0}
29 : 8468 {10,2,0}
30 : 10800 {12,0,0}
31 : 15686 {16,10,0}
32 : 11744 {11,15,0}
33 : 19338 {17,25,0}
34 : 19618 {16,33,0}
35 : 22575 {18,15,0}
36 : 19620 {15,5,0}
37 : 15688 {11,17,0}
38 : 28234 {19,21,0}
39 : 19617 {12,35,0}
40 : 25480 {15,37,0}
41 : 31406 {18,28,0}
42 : 19614 {11,5,0}
43 : 40291 {21,34,0}
44 : 25476 {13,7,0}
45 : 31410 {15,23,0}
46 : 31418 {14,39,0}
47 : 25474 {11,25,0}
48 : 69264 {30,3,0}
49 : 31409 {13,4,0}
50 : 31400 {12,28,0}
|
Posted by Daniel
on 2010-09-04 19:22:49 |
|
![](/images/dot.gif) |
Please log in:
Forums (0)
Newest Problems
Random Problem
FAQ |
About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On
Chatterbox:
|