How might I use this function to determine probability? I am trying to make a random number generator that is sorta special.  Basically it generates a number between 5, and 17.  The twist that I need math help on is that I want to have a variable "P" that works like the following.
The higher p is the more likely numbers closer to 17 are to appear, the lower it is the more likely for number closer to 5 to appear.
I have found the perfect function to model this, 
1 /( 1 + abs((x - c) / a)^2B)
you can play around what it here
Anyway when I see that function I am considering the X axis as each of the numbers (5 - 17) and the y axis as the probability that it will be randomly picked. Notice how if you change the value of "C" you change where the hump is.  This is what will be the "P" variable.  As you can see the higher C is the higher the numbers the hump is over are.
How exactly would I mathmatically do this?  I have taken 1d data like the result of a dice before and turned it into a 2d bar graph before, but what I need to do this time is the opposite way around.
Edit: The gausian function might work well too
https://www.desmos.com/calculator/i4aydcx5ts

To answer the question of what kind of distribution to use (as opposed to David K's good answer regarding how to "implement" a distribution), you might consider the beta distribution, scaled and translated appropriately (multiply by $12$ and add $5$).  By adjusting the parameters $\alpha$ and $\beta$, you can achieve something akin to the shape you want.
