Any digit-pair in S
sums to a prime
[Sent:
Thursday, April 11, 2013 12:57 AM]
Hello SeqFans,
Any
digit-pair in S sums
to a prime, commas or not:
S = 1, 2, 3, 4, 7, 6, 5, 8, 9, 20, 21, 11, 12, 14, 16,
50, 23, 25, 29, 41, 43, 47, 49, 83, 85, 61, 65, 67, 411, 111, 112, 30, 32, 34,
38, 52, 56, 58, 92, 94, 70, 74, 76, 114, 98, 302, 116, 120, 202, 121, 123, 89,
203, ...
S is supposed not to show twice the same integer, and S
wants to be the lexico-first such seq.
* * *
The same seq with prime absolute
differences between digits is perhaps T:
T = 1, 3, 5, 2, 4, 6, 8, 13, 14, 7, 9, 20, 24, 16, 18,
30, 25, 27, 29, 41, 31, 35, 36, 38, 50, 52, 42, 46, 47, 49, 61, 63, 53, 57, 58,
64, 68, 69, 70, 72, 74, 75, 79, 202, 92, 94, 96, 81, 83, 85, 86, 97, 203, 130,
205, 207, 241, 302, 413, 131, ...
Best,
É.
__________
[Lars Bromberg] :
Hello Eric,
Here is a graph of the S sequence with
values < 10^5.
For each
maximum value 10^n there are much fewer candidates that are internally
consistent.
Calculating
the candidates first greatly reduces the work of finding the sequence.
This table
shows the length of the sequence and the number of candidates for some maximum
values
Max =
10^n Sequence Candidates
2
28 41
3
147 166
4
503 643
5
2119 2467
6
7581 9432
7
30731 36078
8
112977 137844
9
447183 527115
A little on
the side: The number of candidates increases by a factor of about 3.82 for each
power of 10.
S = 1, 2, 3, 4, 7, 6, 5, 8, 9, 20, 21, 11, 12, 14, 16, 50,
23, 25, 29, 41, 43, 47, 49, 83, 85, 61, 65, 67, 411, 111, 112, 30, 32, 34, 38, 52,
56, 58, 92, 94, 70, 74, 76, 114, 98, 302, 116, 120, 202, 121, 123, 89, 203, 205,
207, 412, 125, 211, 129, 212, 141, 143, 214, 147, 414, 149, 216, 161, 165, 230,
232, 167, 416, 502, 303, 234, 305, 238, 307, 430, 250, 252, 320, 256, 503, 258,
321, 292, 323, 294, 325, 298, 329, 432, 341, 434, 343, 438, 347, 470, 349, 474,
383, 476, 505, 611, 492, 385, 612, 389, 494, 702, 507, 498, 520, 521, 614, 703,
830, 523, 832, 525, 616, 529, 834, 705, 650, 561, 652, 565, 656, 567, 658, 583,
838, 585, 670, 589, 850, 707, 674, 741, 676, 743, 852, 920, 747, 4111, 1111, 1112,
921, 1114, 749, 856, 761, 1116, 765, 858, 923, 892, 925, 894, 767, 4112, 929, 898,
941, 1120, 2020, 2021, 1121, 1123, 2023, 2025, 2029, 2030, 2032, 943, 2034, 947,
4114, 949, 2038, 983, 2050, 2052, 985, 2056, 1125, 2058, 989, 2070, 2074, 1129,
2076, 1141, 1143, 2111, 1147, 4116,...
The T sequence has similar properties, although the factor
between the candidates is about 4.64.
T = 1, 3, 5, 2, 4, 6, 8, 13, 14, 7, 9, 20, 24, 16,
18, 30, 25, 27, 29, 41, 31, 35, 36, 38, 50, 52, 42, 46, 47, 49, 61, 63, 53, 57,
58, 64, 68, 69, 70, 72, 74, 75, 79, 202, 92, 94, 96, 81, 83, 85, 86, 97, 203, 130,
205, 207, 241, 302, 413, 131, 303, 135, 242, 414, 136, 138, 141, 305, 246, 142,
416, 146, 147, 247, 249, 250, 252, 418, 149, 253, 161, 307, 257, 258, 163, 164,
168, 169, 270, 272, 420, 274, 181, 313, 183, 185, 275, 279, 292, 424, 186, 314,
294, 296, 316, 318, 350, 297, 425, 352, 427, 429, 461, 353, 502, 463, 503, 505,
357, 464, 613, 507, 468, 358, 361, 363, 520, 364, 614, 616, 368, 369, 469, 470,
381, 383, 524, 618, 385, 386, 472, 474, 630, 525, 702, 475, 703, 527, 479, 492,
494, 631, 496, 497, 529, 635, 705, 707, 530, 531, 636, 813, 535, 720, 536, 814,
638, 538, 570, 572, 574, 641, 642, 575, 724, 646, 816, 818, 579, 647, 581, 649,
681, 683, 583, 585, 725, 727, 586, 830, 729, 685, 741, 686, 831, 692, 742, 746,
835, 747,...
Regards,
Lars.
__________
[Maximilian Hasler]:
> Any
digit-pair in S sums to a prime, commas or not:
> S=1,2,3,4,7,6,5,8,9,20,21,11,12,14,16,50,23,25,29,41,43,47,49,83,85,61,65,
I think
"any 2 subsequent digits" would be better, "any pair" does
not require that they are neighbors.
> S is supposed not to show twice the same integer, and S
wants to be the lexicofirst such seq.
The sequence
[starting with zero]:
0, 2, 1, 4, 3, 8, 5, 6, 7, 41, 11, 12, 9, 20, 21, 14, 16,
50, 23,...
has the same
property and is lexicographically smaller than yours. ;-)
My script confirms
your terms (if they are to be positive):
EA114(n,a=[1],u=0)={ while(#a<n, u+=1<<a[#a];
for(t=a[1]+1,9e9, bittest(u,t) & next; my(d=concat(a[#a]%10,digits(t)));
for(i=2,#d, isprime(d[i-1]+d[i])
|| next(2)); a=concat(a,t);break));a
}
> The
same seq with prime absolute differences between
digits is perhaps T:
>
> T=1,3,5,2,4,6,8,13,14,7,9,20,24,16,18,30,25,27,29,41,31,35,36,38,50,52,42,46,
>
47,49,61,63,53,57,58,64,68,69,70,72,74,75,79,202,92,94,96,81,83,85,86,97,
>
203,130,205,207,241,302,413,131,...
Here, too,
my script confirms your terms if they are to be positive:
EA114b(n,a=[1],u=0)={ while(#a<n, u+=1<<a[#a];
for(t=a[1]+1,9e9, bittest(u,t) & next; my(d=concat(a[#a]%10,digits(t)));
for(i=2,#d, isprime(abs(d[i-1]-d[i]))
|| next(2)); a=concat(a,t);break));a
}
... and else yields [starting with zero]:
0, 2, 4, 1, 3, 5, 7, 9, 6, 8, 13, 14, 16, 18, 30, 20,
24, 25, 27, 29, 41, 31, 35, 36, 38, 50, 52, 42, 46, 47, 49, 61, 63, 53, 57, 58,
64,68, 69, 70, 72, 74, 75, 79, 202, 92, 94, 96, 81, 83,...
A related
sequence would be that of numbers which certainly will never be in any of these
sequences, like 10,13,15,17,18,19,22,24,...
which is not yet
on OEIS, and between 10 and 100 close to A104211 “Integers n such that the sum of the
digits of n is not prime”.
Best wishes,
Maximilian
__________
Many thanks,
Lars and Maximilian!
Best,
É.