A359734 Lexicographically earliest sequence of distinct nonnegative integers such that the sequence A051699(a(n)) (distance from the nearest prime) has the same sequence of digits.
1, 10, 2, 0, 3, 26, 9, 119, 532, 4, 6, 896, 118, 34, 15, 93, 121, 531, 898, 205, 8, 12, 533, 50, 117, 14, 122, 1078, 56, 16, 21, 18, 144, 64, 20, 895, 1138, 899, 25, 5, 186, 1077, 22, 27, 204, 76, 86, 206, 7, 24, 28, 120, 30, 123, 32, 33, 35, 36, 11, 300
Offset: 0
Examples
Below, row "p" lists the closest prime to a(n) and row "d" the absolute difference |a(n)-p|. We have the same sequence of digits in rows a (this sequence) and d: n : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... a : 1 10 2 0 3 26 9 119 532 4 6 896 118 34 15 ... p : 2 11 2 2 3 23 7 113 523 3 5 887 113 31 13 ... d : 1 1 0 2 0 3 2 6 9 1 1 9 5 3 2 ...
Links
- Eric Angelini, Digit-spines, personal blog "Cinquante signes" on blogspot.com, Jan. 11, 2023.
- Eric Angelini, Digit-spines, personal blog "Cinquante signes" on blogspot.com, Jan. 11, 2023. [Cached copy]
Crossrefs
Programs
-
PARI
spine(f, N=20, S=[], d=[], md = n -> if(n, digits(n), [0])) = { vector(N, n, my(m, j=1); for(k=0, oo, setsearch(S, k) && next; while( f(j) < k, j++); m = md(min(m = f(j) - k, iferr(k - f(j-1), E, m))); if(m == concat(d, md(k))[1..#m], d = concat(d, md(k))[#m+1 .. -1]; m=k; break)); S = setunion(S, [m]); m)} spine(prime, 200) \\ 200 terms of this sequence
Comments