Timeline for How to define a function that satifies this condition?
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 19 at 5:39 | vote | accept | Teflon | ||
Apr 19 at 0:54 | history | edited | Bill Dubuque |
edited tags
|
|
Apr 18 at 17:31 | vote | accept | Teflon | ||
Apr 18 at 17:36 | |||||
Apr 18 at 17:24 | answer | added | Greg Martin | timeline score: 1 | |
Apr 18 at 17:11 | history | edited | Greg Martin | CC BY-SA 4.0 |
deleted 2 characters in body
|
Apr 18 at 17:10 | comment | added | JMoravitz | In the end though, I would personally find it easiest to build this by defining a piecewise defined function, and define each part separately based on the ones-digit of $n$. The overall function will then follow $f(n) = f(n-10)+30$ and so could be written in terms of $n - (n\%10)$ coupled with this piecewise function. | |
Apr 18 at 17:10 | comment | added | freakish | Are you asking about partial sums of some sequence? Either way, if you know how to define it programmatically then you know how to define it mathematically. The same definition works, algorithms are completely valid mathematical definitions. | |
Apr 18 at 17:08 | comment | added | JMoravitz | There are multiple ways you could do this... especially if you allow if-conditions in the middle of your expression. Consider using %10 to find the ones-digit of $n$, an if-condition (or disguised if-condition) to determine if the ones-digit was zero, multiplication as necessary, and floor functions if you want to have certain values repeat in the calculation. | |
Apr 18 at 17:00 | history | asked | Teflon | CC BY-SA 4.0 |