A function is a mathematical construct. Think of it as a black box that takes in a number and converts it by a set of operations into an output. Simple ones could be f(x) = 2x, a function that just doubles the input. This function is defined for all values of x (both real and complex) however some functions only exist for positive x or integer x or similar.
A slightly more complex function example would be f(x) = 1/x^2. This function will take a large value when x is very small and a trailing value as x increases. It will never equal zero and is undefined when x=0. It is also symmetrical as a negative x will give the same answer a positive x of equal magnitude.
Functions don't have to have easily defined actions. They can do different things to different numbers. For example the Heaviside function, written as H(x). For
H(x) = 0 for x < 0
H(x) = 1 for x > 0
So it's one for positive x and zero for negative x. It is undefined at x=0. This function is used to simulate a switch in an electrical circuit and also in math for various driving functions.
And now an example of a function that only exists for positive integers.
f(x) = x!
This function is a simplified version of the gamma function (which is defined for all x) but that doesn't matter. The factorial operator multiplies a positive integer x by all positive integers less than it. Graphing this function would give a series of dots at integer values of x with nothing joining them.
So let's define a function. It will only be defined when n is a positive integer (like the factorial function above) and will take a range of values depending on the properties of n. We will refer to it as u(n).
If n is a prime number then u(n) = -1.
If n is a composite number (i.e. not a prime) then if its prime decomposition contains a repeated prime then u(n) = 0.
If n is a composite and its prime decomposition contains an even number of different primes then u(n) = 1
If n is a composite and its prime decomposition contains an odd number of different primes then u(n) = -1
That's quite complicated so let's have some examples:
u(10) = 1
as 10= 5*2 so an even number of non-repeated primes
u(96) = 0
as 96 = 3*2*2*2*2*2 so a repeated prime
And the first 10 values of this function will be:
1, -1, -1, 0, -1, 1, -1, 0, 0, 1
So we have defined our function. Now is it useful? Well not really. However what if we define a second function. This new function M(n) will be defined as the sum of all u(n) values up to n.
So the first 10 values will be:
1, 0, -1, -1, -2, -1, -2, -2, -2, -1
So now we come to the poser in this whole mess. Show that either; the absolute value (magnitude) of M(n) will never exceed the square root of n or find a value at which it does.