I am trying to explain R code:
(1:n)/(n+1)
such that:
> n <- 4 > (1:n)/(n+1) [1] 0.2 0.4 0.6 0.8
I might use
$\frac{\{1, \ldots ,n\}}{n+1}$
Is that okay? It seems to imply $n\neq1$. Does it?
I am trying to explain R code:
(1:n)/(n+1)
such that:
> n <- 4 > (1:n)/(n+1) [1] 0.2 0.4 0.6 0.8
I might use
$\frac{\{1, \ldots ,n\}}{n+1}$
Is that okay? It seems to imply $n\neq1$. Does it?
A lot of people are going to be completely mystified if you write $\frac{\{1, ... ,n\}}{n+1}$ I think you would do better to write this: $\frac1{n+1},\cdots,\frac n{n+1}$
Note that there are no curly braces, which would imply that the result was a set, rather than a sequence.
Perhaps you could write the first one if you first explained that it means the second one.
My suggestion does not imply $n\ne 1$. $n=1$ is perfectly okay, and in that case the expression means a sequence with one element.
R most likely generates an empty sequence when $n=0$; check this. If not, mention it explicitly. Depending on your audience, you might want to mention it anyway.