A few years ago, when I was learning jazz improvisation, I started using melodic sequences when practicing scales and arpeggios. One of the toughest improvisational ruts to overcome is the habit of running up and down scales when you don't know what else to do. I had a lot of scales to practice back then, and I wanted to do it in a way that didn't reinforce this habit. A sequence is simply a method of playing a group of notes in a manner other than consecutively, so the concept was just what I needed.

One of the easiest sequences is a diatonic scale by thirds: 1 3 2 4 3 5 4 6 etc. I think of a sequence as a pattern repeated relative to each successive note in a scale. I refer to the sequence I just wrote out as 1 3 or 2 1 (they are the same). The 1 3 pattern relative to the first note yields 1 3, relative to the second yields 2 4, etc. You end up with the same sequence if you apply the 2 1 pattern, just a different starting note.

There aren't many two-note sequences, so they're easy to write out:
1 2 = 1 1 (1 2 2 3 3 4 4 5 5 6 . . .)
1 3 = 2 1 (1 3 2 4 3 5 4 6 5 7 . . .)
1 4 = 3 1 (1 4 2 5 3 6 4 7 5 8 . . .)
1 5 = 4 1 (1 5 2 6 3 7 4 8 5 9 . . .)
. . .

I'm notating everything as ascending from the first note, but you only need to invert the pattern when you want to descend.

Moving on to three-note sequences, there are many more to choose from. This list is not exhaustive, but includes every permutation of the first three notes, with their equivalent patterns. Try writing these out and extending the pattern to make sense of them. A sequence initiated by 1 2 3 would proceed as 1 2 3 2 3 4 3 4 5 4 5 6 etc.
1 1 1 = 1 1 2 = 1 2 2
1 1 3 = 1 3 2 = 2 1 1
1 2 1 = 2 1 2 = 1 2 3
1 3 1 = 3 1 2 = 1 2 4
1 3 3 = 2 2 1 = 2 1 3
2 3 1 = 3 1 3 = 1 3 4
3 1 1 = 1 1 3 = 1 4 2
3 2 1 = 2 1 4 = 1 4 3
3 3 1 = 3 1 4 = 1 4 4

I've tried but never successfully written out a systematic study of sequences of more than three notes because there are so many. It's still fun to discover one once in a while. The obvious starters are 1 2 3 4 and 4 3 2 1. Go wild.

Keep in mind that these sequences can be applied to any group of notes: diatonic scales, pentatonic scales, triad arpeggios, über arpeggios, etc. Just apply the numbers above to the order of notes.

Now I can grab a piece of one of these sequences as easily as a string of consecutive notes during improvisation. It provides a huge variety of easily accessible melodies and makes me suck less.