1
$\begingroup$

I had just recently asked about sequences, and was told about indicator functions. I had asked about $$S= 1,0,1,0,0,1,0,0,0...$$ And concluded it was just 1 if the ordinal is a triangular number, and 0 elsewhere.

But what happens if the 1 changes with $n$, that is, the sequence $$S=1,0,2,0,0,3,0,0,0,4,0,0,0,0,5...$$ How could you write that using an indicator function?

I've tried coming up with a few, but it always comes up a bit off.

2 Answers 2

1

The answer to the previous question was: $$ f(n) = \begin{cases} \color{red}1 \quad \text{$\exists k \in \mathbb N , n = \frac{k(k+1)}2 $} \\ 0 \quad \text{otherwise} \end{cases} $$

Now, you would just write: $$ f(n) = \begin{cases} \color{blue}{k} \quad \text{$\exists k \in \mathbb N , n = \frac{k(k+1)}2 $} \\ 0 \quad \text{otherwise} \end{cases} $$

  • 2
    Well, I feel silly now. I had kept trying it by writing an $n$ where your $k$ is.2017-02-22
  • 0
    @RyanGoulden Don't worry, it has happened to all of us before. If you have realized your mistake, I am extremely happy. Now try more examples: For example, try the following: $1,1,2,1,1,3,1,1,1,4,1,1,1,1,5,1,1, \ldots$.2017-02-22
1

Recall that the sum of the first $n$ natural numbers is $\sum_{i=1}^{n}i=\frac{n(n+1)}{2}$. Let $e_i$ denote the sequence which one in position $i$ and zero elsewhere.

Then your first $S$ is given by $$S=\sum_{i=1}^{\infty}e_{\frac{i(i+1)}{2}}. $$

The second $S$ is given by $$S=\sum_{i=1}^{\infty}ie_{\frac{i(i+1)}{2}}.$$

  • 0
    The first $S$ is given by a sum? How does this make any sense? $S$ is a **sequence**2017-02-22
  • 0
    @5xum: Because $e_i$ is a sequence, the sum of sequences is a sequence. Did you downvote for that? It's not wrong.2017-02-22
  • 0
    I was wrong. Sorry. I didn't see that $e_k$ is a sequence.2017-02-22
  • 0
    No problem, the subindex isn't nicely spaced so it's perhaps a bit unclear at first sight.2017-02-22