-2
$\begingroup$

I'm working with days of the week and need to generate a series thats $n*7-1$ except for where $n=1$ where it should be $0$.

So the series I'm after is $0,6,13,20,27$

I can't figure out a formula for this series though!

Any help would be appreciated!

Many thanks

$\endgroup$
  • 4
    $\begingroup$ Shouldn't it be $0,6,13,20,27$? $\endgroup$ – kingW3 May 26 '18 at 13:21
0
$\begingroup$

You probably won't get (and probably don't really need) a single "formula". This will work in any document, or computer program, or spreadsheet:

$$f(n) = \begin{cases} 7n -1 & n \ne 0 \\ 0 & n= 0 \end{cases} $$

$\endgroup$
0
$\begingroup$

Using the Kronecker delta:

$a_n=7n-1+\delta_{0,n}$

Note we start with $n=0$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.