I'm attempting to come up with a definition for a sequence, as per my college text book on Discrete Mathematics and online sources. This is what I've put together thus far:
A sequence is a function f from A to B where A is a subset of the set of integers $\mathbf{Z}$. If $s \in A$ and $(s + k) \in A$ for an integer $k > 1$ then $(s + j) \in A$ for all positive integers $j < k$. We write $\alpha_n$ to denote the the image of $n$ such that $\alpha_n = f(n)$. $\alpha_n$ is said to be the $n^{th}$ term of the sequence.
The part that I would like to draw attention to is the following intuition which I made explicit:
If $s \in A$ and $(s + k) \in A$ for an integer $k > 1$ then $(s + j) \in A$ for all positive integers $j < k$.
This makes sense to me, but as a sanity check I wanted to run it by you good folks to see if in practice there are cases where this is not the case? Thanks!
The part of this definition that you're asking about is really the bit where it's trying to talk about the concept of an interval in the integers, i.e. whether a set $A$ fulfilling the given property is "the same thing" as a subset of the integers having no gaps.
In your definition, the property is saying that whenever $A$ contains two integers $s$ and $s+k$, with $k>1$, then it also contains all the integers in between. This includes the possibility of $A$ being finite or infinite, and it could be infinite in "both directions", stretching off, informally speaking, towards neither, either or both of $\infty$ and $-\infty$. For example, $A = \mathbb{Z}$ does work, as does $A = \mathbb{N}$, but something like the set of all even numbers fails, as does $\{x \in \mathbb{Z} : |x| > 10\}$.
As phrased, $A$ could also be a singleton, since it vacuously fulfils the property. That's fine since a one-element finite sequence is still a sequence. Also, $A$ could be the empty set, for which the property is also vacuously true, and we have "the empty sequence" in result. These special cases, especially the empty one, will need a bit of caution in phrasing subsequent definitions and theorems. But they are fine here, since banning the empty interval from the definition would cause different problems, e.g. if you want to talk about the intersection of two intervals.
An oddity is that because the condition says $k > 1$ rather than $k \ge 1$, it also holds vacuously for two-element intervals like $\{17, 18\}$. We do want these to be intervals, so that's fine in the end, and it does work for disallowing one-element gaps (where $k = 2$, but then $j = 1$ fills the gap since $1 < 2$). It's just a little awkward that these aren't covered "directly" by the definition, but sneak in by a side route.
So the definition does appear to be capturing all of the intended sets $A$, albeit for slightly different reasons in the case of finite, infinite, singleton, two-element, and empty $A$.
An alternative formulation of the property could be: $$ \forall s, x, t \in \mathbb{Z}\colon \left( (s \in A \wedge t \in A \wedge s \le x \wedge x \le t) \implies x \in A \right) $$ In the integer-index case, this is the same as your definition (because if $t$ is greater than $s$ then it has to be equal to $s+k$ for some $k$, and similarly for $x$). But this definition is closer to what would be used for domains like $\mathbb{Q}$ and $\mathbb{R}$, where there is no finite enumeration of the in-between values $x$. You might find this way of writing it easier to work with since it avoids worrying about edge cases on $j$ and $k$ (e.g. "positive" vs "nonnegative") and is a pretty direct expression of the idea of "no gaps".