# How could one denote such a sequence?

I want to express the following in sequence:

$S$ is a sequene of natural numbers such that $n$ is repeated $x$ times, where $x$ is a positive integer.

In the following example, $x = 2n-1$

$$S = \{\underbrace{1}_\textrm{x = 1},\underbrace{2,2,2}_\textrm{x = 3},\underbrace{3,3,3,3,3}_\textrm{x = 5},\underbrace{4,4,4,4,4,4,4}_\textrm{x = 7},\dots\}$$

• Sets don't have repeated elements (compare with multiset). Therefore $$S=\{1,2,3,4,\ldots\}=\mathbb{N}.$$ – Zev Chonoles Aug 8 '13 at 0:13
• @ZevChonoles: Point. A sequence is what I want. – JohnWO Aug 8 '13 at 0:17
• What you've done already is probably best: define $S$ and subsequently refer to $S$. You could get clever, e.g. define $\bigoplus$ (or something else) as sequence concatenation and define $S=\bigoplus_{n \geq 1} (n)_{i=1}^{2n-1}$, but it's more likely to cause more harm than good. (NB. This is Sloane's A003059.) – Douglas S. Stones Aug 8 '13 at 0:27
• Curiously, this sequence is $(\lceil \sqrt{n} \rceil)_{n \geq 1}$. – Douglas S. Stones Aug 8 '13 at 0:35
• @DouglasS.Stones yes, and with $x = 2n+1$ the sequence is $(\left \lfloor \sqrt{n} \right \rfloor)_{n\geq1}$ – JohnWO Aug 8 '13 at 0:53

There are a few ways you could do this, one of the easiest would be to let your sequence contain ordered pairs of natural numbers $(n_i,m_i)$ which you just choose to interpret as "the number $n_i$ repeated $m_i$ times."
Take the sequence with has $n$th term the natural number $n$ repeated $x_n$ times (where $x_n$ is something you define).