I was reading about the Euler phi function and the sigma function when I began to wonder how on earth one gets to the general formula for an arithmetic function. I'm not considering trivial formulae involving the arithmetical property of$\ f(x)$ itself. Also, assume some "regularities" are known. Say for example,$$\ f(2^n)=2n; \\ f(2^n-2)=2^{n-1}, n\ge 2; \\ f(2^n-4) =2^n-4, n\ge 3; \\ f(2^n -5)=2^n-5, n\ge 3; \\ f(3^n)=3^n; \\ f(3^n+1)=3^n+1; \\ f(10^n)=10^n; \\ f(10^n-1)=10^n-1, n\ge 1.$$ But at the same time, suppose some apparently (well, now they actually are, but suppose they aren't) random values of$\ f(x)$ pop up, like$$\ f(23) =38; \\ f(25)=102; \\ f(31)=90; \\ f(33)=132; \\ f(34)=132; \\ f(55)=306; \\ f(63)=132; \\ f(75)=870; \\ f(77) =1482; \\ f(119)=1090; \\ f(121)=2660. $$ I know more values are needed, but essentially what should one start off by in the research?
P.S. If you think this question would better suit MO, consider telling me or just migrating it.
First it really depends on what you mean by "general formula", as all arithmetic functions can be represented by an arbitrary number of formula. Though if your function satisfies particular properties, such as being multiplicative or additive and can be represented as a series of some other function over its divisors. Then their are some ways to obtain what I think you are considering a "general formula", for example if $v_p(n)$ denotes the p-adic order of $n$ then we have:
For two arbitrary multiplicative arithmetic functions $f$ and $g$ that:
$$\sum_{d\mid n}f(d)g(\frac{n}{d})=\prod_{p\mid n}(\sum_{k=0}^{v_p(n)} f(p^k)g(p^{v_p(n)-k}))$$
In addition for an arbitrary additive function $h$ if we define:
$$ \hat{h}(k) \stackrel{}{=} \begin{cases} h(p^j)-h(p^{j-1}) & \text{if $ k= p^{j} $ is a power of a prime, with $j\ge 1$} \\ 0 & \text{otherwise } \end{cases} $$
Then we have the following representation of our arithmetic function $h$: $$h(n)=\sum_{d\mid n}\hat{h}(d)$$
To simplify things even further when working with these sorts of divisor sums, the German mathematician Peter Gustav Lejeune Dirichlet introduced the notion of a Dirichlet convolution between two functions, and showed that all arithmetic functions under this operation form a commutative ring. Now with this higher abstraction we can just treat the arithmetic functions in question as elements of a set and manipulate/invert associated convolution operations appearing in our formula, which allows us to derive complex equivalencies in a far more easy manner.
Applying the two formula for both additive and multiplicative functions I listed, we can use the first equivalence to write the Euler phi function and the sigma function as a product of expressions involving their prime factors, namely:
$$\phi(n)=n\prod_{p\mid n}(1-\frac{1}{p})$$ $$\sigma(n)=\prod_{p\mid n}\frac{p^{v_p(n)+1}-1}{p-1}$$
Whereas the second formula I listed can be used to derive the relation between the Vonmangoldt function and the natural logarithmic function, a relation which is used extensively in analytic number theory to obtain results about prime numbers, namely: $$\ln(n)=\sum_{d\mid n}\Lambda(d)$$