|
|
A332073
|
|
The Silver Comma sequence: Differences of indices of prime terms gives back the sequence; lexicographically earliest such permutation of positive integers.
|
|
0
|
|
|
1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 11, 14, 15, 16, 18, 13, 20, 21, 22, 24, 25, 17, 26, 27, 28, 30, 32, 33, 34, 19, 35, 36, 38, 39, 40, 42, 23, 44, 45, 46, 48, 49, 50, 51, 52, 29, 54, 55, 56, 57, 58, 60, 62, 63, 64, 31, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 37, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 41
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
The prime terms are at indices 2, 3, 5, 8, 12, 17, 23, 31, 38, 47, 57, 69, 80, 94, ...; first differences give 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 11, 14, ... = the sequence itself.
|
|
PROG
|
(PARI) upto(N)={local(U=[2]); my(a=Vec([1, 2], N), i=1, L=2, nxt(p)=while(#U>1 && U[2]==U[1]+1, U=U[^1]); my(t=U[1]); until(if(p, t=nextprime(t+1), !isprime(t+=1)) && !setsearch(U, t), ); U=setunion(U, [t]); t); for(n=3, N, a[n]=nxt(n-L==a[i] && i++ && L=n)); a}
|
|
CROSSREFS
|
Cf. A197756 (the Yellow Comma sequence: count digits between odd terms).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|