|
|
A332072
|
|
The Blue Comma sequence: Differences of indices of even terms gives back the sequence; lexicographically earliest such permutation of positive integers.
|
|
0
|
|
|
1, 2, 4, 3, 6, 5, 7, 9, 8, 11, 13, 10, 15, 17, 19, 21, 23, 12, 25, 27, 29, 31, 14, 33, 35, 37, 39, 41, 43, 16, 45, 47, 49, 51, 53, 55, 57, 59, 18, 61, 63, 65, 67, 69, 71, 73, 20, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 22, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 24, 119, 121, 123, 125, 127
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
The even terms are at indices 2, 3, 5, 9, 12, 18, 23, 30, ...; first differences give 1, 2, 4, 3, 6, 5, 7, ... = the sequence itself.
|
|
PROG
|
(PARI) upto(N)={my(a=Vec([1, 2], N), i=1, L=2); local(U=[2], nxt(e)=while(#U>1&&U[2]==U[1]+1, U=U[^1]); my(t=U[1]); until( t++%2!=e && !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
|
|
|
|