# Function that describes certain modulo function values

Im searching for a function $f(x),\ x\in\Bbb {N}$ which displays every value where:

$h(x) =\big(\frac{3 \cdot x}{32}+33825\big)\mod 802 = 23$

i.e: $h(7296) = 23$ and $f(1) = 7296$

How can I get to that function?

You can observe that $h(x)-23$ is sawtooth function, with steps that range from $-23=0-23$ to $779=802-23$ over a domain that is $8554\frac23 =802\cdot \frac{32}3$ long. Each tooth crosses the X axis at an offset of $245\frac13=23\cdot\frac{32}3$ from the beginning of a tooth.
However you only want solutions where $x$ is a natural number. So you want to know where every third tooth crosses the X axis, which means the period is $8554\frac23\cdot 3=25664$. The first positive crossing is at $x=7296$, the second is at $x=7296+25664$, the third at $x=7296+2*25664$, etc.
From there you get $f(x)=25564x+7296$. But you want $f(1)=7296$, so you have to adjust $f(x)$ to $f(x)=25564(x-1) + 7296$
• how do i get to $802\cdot\big(\frac{32}{3})$ (sorry if this is obvious) – Blija Oct 22 '17 at 21:53
• Since $h(x)$ is $\mod 802$, you want to know how much you must increase the "argument" to$\mod 802$, by 802 to go through a period of the sawtooth. That mean $\frac{3x}{32}$ must increase by $802$. So the period, $p$, could be expressed as $802=\frac{3p}{32}$. Solving for $p$ gives you that answer. – Χpẘ Oct 22 '17 at 22:00