login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Eric Angelini, Yellow commas, pink, red, blue..., personal blog "Cinquante signes" on blogspot.com, May 17 2020
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).
Sequence in context: A255552 A255551 A366949 * A330340 A328696 A053629
KEYWORD
nonn
AUTHOR
Eric Angelini and M. F. Hasler, May 19 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)