Comma Prime-sums
(based on this idea)
Hello SeqFans,
a(n) is the
smallest integer not yet present in S such that the leftmost digit of a(n) and the rightmost digit of
a(n-1) sum up to a prime – with a(1)=1.
S = 1,2,3,4,7,6,5,8,9,20,21,10,22,11,12,13,23,24,14,15,25,26,16,...
(by hand)
I think S is
a derangement of N.
Say a record of the successive "prime-sums" is kept [those
sums can only be equal to 2, 3, 5, 7, 11, 13 and 17]; will the frequency of
each sum slowly converge to 1/7th?
Best,
É.
Christopher Gribble:
The first
100 terms are:
1, 2, 3, 4,
7, 6, 5, 8, 9, 20, 21, 10, 22, 11, 12, 13, 23, 24, 14, 15, 25, 26, 16, 17, 40,
27, 41, 18, 30, 28, 31, 19, 29, 42, 32, 33, 43, 44, 34, 35, 60, 36, 50, 37, 45,
61, 46, 51, 47, 48, 38, 39, 49, 80, 52, 53, 81, 62, 54, 70, 55, 63, 82, 56, 57,
64, 71, 65, 66, 58, 59, 83, 84, 72, 90, 73, 85, 67, 68, 91, 69, 86, 74, 75, 87,
400, 76, 77, 401, 100, 78, 92, 93, 88, 94, 79, 89, 200, 201, 101, ...
The
frequencies of occurrence of the 7 prime sums over the first 9999 terms are:
2
773
3
483
5
1219
7
1835
11 3720
13 1197
17 772
... suggesting
non-uniformity of distribution.
(...)
The ways in which prime sums can be formed from
the least significant digit (LSD) of a(n-1) and the
most significant digit (MSD) of a(n) are:
2 0 + 2, 1 + 1
3 0 + 3, 1 + 2, 2 + 1
5 0 + 5, 1 + 4, 2 + 3, 3 + 2, 4 + 1
7 0 + 7, 1 + 6, 2 + 5, 3 + 4, 4 + 3, 5 + 2, 6
+ 1
11 2 +
9, 3 + 8, 4 + 7, 5 + 6, 6 + 5, 7 + 4, 8 + 3, 9 + 2
13 4 +
9, 5 + 8, 6 + 7, 7 + 6, 8 + 5, 9 + 4
17 8 +
9, 9 + 8
These partitions are not uniformly distributed
as can be seen from their frequencies in the first 9999 pairs.
MSD 0
1 2 3 4 5 6 7 8 9
LSD
0 0 0 273
219 0 225
0 284 0
0
1 0
500 1 0
198 0 303
0 0 0
2 0
263 0 209
0 227 0
0 0 302
3 0 0 323
0 207 0
0 0 471 0
4 0
264 0 209
0 0 0 511
0 17
5 0 0 325
0 0 0 507
0 168 0
6 0
280 0 0 0 436
0 284 0
0
7 0 0 0 0 698
0 301 0
0 0
8 0 0 0 474
0 223 0
0 0 300
9 0 0 321
0 204 0
0 0 472 0
(...)
My C++ program halts with a stack
overflow exception for n = 100000. However, for n = 10000 and 20000 the prime sum frequencies are:
2
773 2762
3
483 1315
5 1219
3051
7 1835
3835
11 3720
6732
13
1197 1362
17
772 942
The frequencies with which the partitions of the
prime sums into the least significant digit (LSD) of a(n-1) and the most significant digit (MSD) of
a(n) are for n = 20000:
MSD 0
1 2 3 4 5 6 7 8 9
LSD
0 0 0 1262 219
0 225 0
295 0 0
1 0
1500 1 0
198 0 303
0 0 0
2 0 1095 0
209 0 227
0 0 0 469
3 0 0 1322 0
207 0 0 0 471
0
4 0
1097 0 209
0 0 0 522
0 172
5 0 0 1325 0 0 0 507
0 168 0
6 0
1269 0 0 0 436
0 294 0
0
7 0 0 0 0 1698
0 301 0
0 0
8 0 0 0 1306
0 223 0
0 0 470
9 0 0 1323 0
204 0 0 0 472
0
It is
interesting to note that some frequencies have not changed.
For n =
10000:
The smallest
integer not present in the first 10000 terms = 7968
The largest
integer present in the first 10000 terms = 40195
For n =
20000:
The smallest integer not present in the first 20000 terms = 13851
The largest integer present in the first 20000 terms = 41195
__________
Thanks, Chris!
The graphs
below were received a couple of days later from Jean-Marc Falcoz. The first one is confirmed by Hans Havermann.
Hans:
« I’ve
put up a graph of 10000 points (dark blue) and their connections (cyan) here. The image is
roughly fractal: the plot for 100000 points would be identical except for multiplying
the x- and y-axis identifiers by 10. »
« Représentation graphique de a(n) en fonction de n pour n=1
jusque n=10000 »
« Représentation plus précise
de a(n) pour n=1 jusque
n=1000 »
« Le début de la suite ; par exemple au tout
début :
1, 2, 3, 4,
puis on redescend avec 7, 6, 5, etc. »
Jean-Marc :
J’ai
les mêmes résultats que Christopher Gribble (y compris les mêmes fréquences d’apparition de
2, 3, 5, 7, 11, 13, et 17)
__________
Thanks everyone, merci
beaucoup!
Best,
É.