0

I was trying to find some function in terms of exponentials and basic arithmetic that satisfies: $$f(n) = n \bmod 10$$

It's very easy to find such an $f$ for $\bmod 2$, so I started trying to express $n \bmod 10$ in terms of lower divisors. Turns out it was extremely easy to come up with the following: $$n \bmod 10 =n \bmod 5 +5((n -(n \bmod 5)) \bmod 2)$$ using this equation: $$5j + (n \bmod 5) = 10k +(n \bmod 10)$$ because $j$ and $k$ are related in the following way: $$2k = j - (j \bmod 2)$$ and $$j = \frac{n - (n \bmod 5)}{5}$$

So now the goal is to find an expression of $n \bmod 5$ in terms of any lower divisor (or any higher one, if it can easily be split). $n \bmod 4$ could easily be split the same way as $10$, but I think it may be impossible to simplify $n \bmod p$, where $p$ is prime.

TigerGold
  • 339
  • Have you tried finite Fourier series? The modulo functions are periodic so it makes sense to use sums of sine functions as in finite Fourier series. – Somos Dec 06 '20 at 02:11
  • Your "extremely easy" result is precisely one form of CRT = Chinese Remainder Theorem, e.g. see Easy CRT. You can't express $,n\bmod 5,$ in terms of :"lower divisors" since there are none. The question is ill-posed unless you say specify the class of expressions you wish to use to represent these mods (which you haven't even done for $,n\bmod 2,,$ so it's impossible to know what you have in mind) – Bill Dubuque Dec 06 '20 at 04:04
  • @BillDubuque when I said "lower divisors," I meant divisor as in $n \bmod x$, where $x$ is the divisor. I don't know another word for that because I have no idea what I'm doing in modular arithmetic in general. Also, the class of expressions was stated: exponentials and arithmetic. For example, $n \bmod 2$ is the same as $\frac{(-1 + (-1^n))^2}{4}$, for integers. – TigerGold Dec 06 '20 at 18:44

0 Answers0