A332073 The Silver Comma sequence: Differences of indices of prime terms gives back the sequence; lexicographically earliest such permutation of positive integers.
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
Offset: 1
Keywords
Examples
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.
Links
- Eric Angelini, Yellow commas, pink, red, blue..., personal blog "Cinquante signes" on blogspot.com, May 17 2020
- Eric Angelini, Yellow commas, pink, red, blue..., personal blog "Cinquante signes" on blogspot.com, May 17 2020 [Cached copy]
Crossrefs
Cf. A197756 (the Yellow Comma sequence: count digits between odd terms).
Programs
-
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}