Échange
virgule contre chiffre-à-gauche
S =
21,12,32,91,33,1,72,111,92,231,132,272,291,273,14,15,4,34,74,192,332,391,312,411,371,392,511,492,572,632,692,711,512,771,
573,75,35,93,112,812,831,633,133,171,671,731,791,813,314,212,931,912,1111,932,1131,972,1292,1311,992,1371,1032,1411,1092,
1431,1172,1532,1611,1232,1791,1293,372,2031,1512,2071,1533,471,1631,1711,1812,2132,2211,1872,2372,2391,1932,2431,2012,2511,
2133,493,531,2171,2231,2291,2312,2672,2691,2373,591,...
P =
2,11,23,29,13,3,17,211,19,223,113,227,229,127,31,41,5,43,47,419,233,239,131,241,137,139,251,149,257,263,269,271,151,277,
157,37,53,59,311,281,283,163,313,317,167,173,179,181,331,421,293,191,2111,193,2113,197,2129,2131,199,2137,1103,2141,1109,
2143,1117,2153,2161,1123,2179,1129,337,2203,1151,2207,1153,347,1163,1171,1181,2213,2221,1187,2237,2239,1193,2243,1201,2251,
1213,349,353,1217,1223,1229,1231,2267,2269,1237,359,1...
En poussant toutes les virgules de S d'un cran vers la gauche on transforme une suite S de non-premiers (tous différents les uns des autres) en une suite P de premiers (tous différents les uns des autres).
----------
[Maximilian Hasler] :
That was easy (after recognizing that S(n) must not end in "0" ;-).
I find the same terms as you (I think - cf. below).
Maximilian
{used=0;S=[]; for(n=1,99, for(s=1,1e9, bittest(used,s) & next;
isprime(s) & next; s%10|next;
p=eval(Str(if(n>0,S[n]%10,""),if(s>9,s\10,""))); bittest(used,p) &
next; isprime(p) | next;
print(n"\t"s"\t"p);S=concat(S,s);used+=2^s+2^p;break));S}
n n-p p
1 21 2
2 12 11
3 32 23
4 91 29
5 33 13
6 1 3
7 72 17
8 111 211
9 92 19
10 231 223
11 132 113
12 272 227
13 291 229
14 273 127
15 14 31
16 15 41
17 4 5
18 34 43
19 74 47
20 192 419
21 332 233
22 391 239
23 312 131
24 411 241
25 371 137
26 392 139
27 511 251
28 492 149
29 572 257
30 632 263
31 692 269
32 711 271
33 512 151
34 771 277
35 573 157
36 75 37
37 35 53
38 93 59
39 112 311
40 812 281
41 831 283
42 633 163
43 133 313
44 171 317
45 671 167
46 731 173
47 791 179
48 813 181
49 314 331
50 212 421
51 931 293
52 912 191
53 1111 2111
54 932 193
55 1131 2113
56 972 197
57 1292 2129
58 1311 2131
59 992 199
60 1371 2137
61 1032 1103
62 1411 2141
63 1092 1109
64 1431 2143
65 1172 1117
66 1532 2153
67 1611 2161
68 1232 1123
69 1791 2179
70 1293 1129
71 372 337
72 2031 2203
73 1512 1151
74 2071 2207
75 1533 1153
76 471 347
77 1631 1163
78 1711 1171
79 1812 1181
80 2132 2213
81 2211 2221
82 1872 1187
83 2372 2237
84 2391 2239
85 1932 1193
86 2431 2243
87 2012 1201
88 2511 2251
89 2133 1213
90 493 349
91 531 353
92 2171 1217
93 2231 1223
94 2291 1229
95 2312 1231
96 2672 2267
97 2691 2269
98 2373 1237
99 591 359
----------
[Graeme McRae] :
In base 2, the sequences are
P=7,29,59,79,113,131,137,149,...
S=15,27,55,95,99,135,147,171,...
In base 3,
P=2,7,13,23,17,19,29,41,67,43,...
S=8,4,14,16,25,32,34,44,40,49,...
--Graeme McRae, Palmdale, CA.