How many X-rays does a light bulb emit? I read somewhere that most things1 emits all kinds of radiation, just very few of some kinds. So that made me wondering whether there is a formula to calculate how many X-rays an 100W incandescent light bulb would emit, for example in photons per second. For example, we already know that it emits infrared and visible light. 
I find it hard to describe what I have tried. I searched on the internet for a formula, but couldn't find it. Yet I thought this was an interesting question, so I posted it here.

1 Black holes don't emit any radiation excepted for Hawking radiation if I get it right.
 A: The formula you want is called Planck's Law. Copying Wikipedia:

The spectral radiance of a body, $B_{\nu}$, describes the amount of energy it
  gives off as radiation of different frequencies. It is measured in
  terms of the power emitted per unit area of the body, per unit solid
  angle that the radiation is measured over, per unit frequency.
$$ B_\nu(\nu, T) = \frac{ 2 h \nu^3}{c^2}  \frac{1}{e^\frac{h\nu}{k_\mathrm{B}T} - 1} $$

Now to work out the total power emitted per unit area per solid angle by our lightbulb in the X-ray part of the EM spectrum we can integrate this to infinity:
$$P_{\mathrm{X-ray}} = \int_{\nu_{min}}^{\infty} \mathrm{B}_{\nu}d\nu,
$$
where $\nu_{min}$ is where we (somewhat arbitrarily) choose the lowest frequency photon that we would call an X-ray photon. Let's say that a photon with a 10 nm wavelength is our limit. Let's also say that 100W bulb has a surface temperature of 3,700 K, the melting temperature of tungsten. This is a very generous upper bound - it seems like a typical number might be 2,500 K.
We can simplify this to:
$$
P_{\mathrm{X-ray}} = 2\frac{k^4T^4}{h^3c^2} \sum_{n=1}^{\infty} \int_{x_{min}}^{\infty}x^3e^{-nx}dx,
$$
where $x = \frac{h\nu}{kT}$. wythagoras points out we can express this in terms of the incomplete gamma function, to get 
$$
2\frac{k^4T^4}{h^3c^2}\sum_{n=1}^{\infty}\frac{1}{n^4} \Gamma(4, n\cdot x)
$$
Plugging in some numbers reveals that the n = 1 term dominates the other terms, so we can drop higher n terms, resulting in
$$
P \approx 10^{-154} \ \mathrm{Wm^{-2}}.
$$
This is tiny. Over the course of the lifetime of the universe you can expect on average no X-Ray photons to be emitted by the filament.
More exact treatments might get you more exact numbers (we've ignored the surface area of the filament and the solid angle factor for instance), but the order of magnitude is very telling - there are no X-ray photons emitted by a standard light bulb. 
A: I will give a closed form for the integral in Chris Cundy's answer.
Doing the substitution $u=nx$, we get
 $$
\sum_{n=1}^{\infty} \int_{x_{min} \cdot n}^{\infty} \frac{1}{n}\left(\frac{u}{n}\right)^3e^{-u}\mathrm{d}u$$
$$
\sum_{n=1}^{\infty} \frac{1}{n^4} \Gamma(4,x_{min}\cdot n)$$
where $\Gamma$ is the upper complete gamma function. We write $a=x_{min}$ as it will be used a lot so a short name is more useful. Using the reduction formula for the gamma function when the first argument is an integer, we get:
$$
\sum_{n=1}^{\infty} \left(\frac{1}{n^4}e^{-an}\left(6+6an+3a^2n^2+a^3n^3\right)\right) $$
$$
6\sum_{n=1}^{\infty} \frac{1}{n^4}e^{-an} + 6a\sum_{n=1}^{\infty} \frac{1}{n^3}e^{-an}+ 3a^2\sum_{n=1}^{\infty} \frac{1}{n^2}e^{-an}+a^3\sum_{n=1}^{\infty} \frac{1}{n}e^{-an}$$
Now note that $$\frac{\mathrm{d}}{\mathrm{d}a} \sum_{n=1}^{\infty} \frac{1}{n}e^{-an} = \sum_{n=1}^{\infty} \frac{\mathrm{d}}{\mathrm{d}a} \left[\frac{1}{n}e^{-an}\right]=\sum_{n=1}^{\infty}-e^{-an}=-\sum_{n=1}^{\infty}(e^{-a})^n=1-\frac{1}{1-e^{-a}}$$
$$\sum_{n=1}^{\infty} \frac{1}{n}e^{-an} = \int  1-\frac{1}{1-e^{-a}} \mathrm{d}a =  -\ln|1-e^{-a}|$$
We'll get the other terms in a similiar way. The final result is:

$$\sum_{n=1}^{\infty} \int_{a}^{\infty} x^3e^{-nx}dx = -6\mathrm{Li}_4(e^a)+6a\mathrm{Li}_3(e^a)+6a^2 \mathrm{Li}_2(1-e^{-a})-9a^2\mathrm{Li}_2(e^a)\\+2a^3\ln|1-e^{-a}|-9a^3\ln|1-e^{a}|+5\frac{3}4 a^4$$

I used a Computer Algebra System to find this form. $\mathrm{Li}_n$ is the polylogarithm function. 
A: The wavelengths of light emitted can be calculated using planks law and the temperature of the object. For your average 100W incandescent light bulb, the filament is 2823 kelvin according to google. 
The spectral radiance, $B$, is equal to 
$$\frac{1.2\cdot10^{52}}{\mathrm{wavelength}^{5}\cdot e^{\frac{1.99\cdot10^{43}}{\mathrm{wavelength}\cdot4\cdot10^{26}}}-1}$$
Math to solve for spectral radiance is hard, so this online calculator will do all the work.
X-rays are between 0.01nm and 10nm. The total radiance at 10nm is $2.7\cdot10^{-187}$photons/s/m2/sr/µm. That's so unbelievably small, It would take a very long time for that bulb to emit an xray photon. The calculator wont give the spectral radiance of the smaller wavelength xrays so we'll just use the biggest X-rays.
In order to figure out how many photons per second are emitted you would need to know the surface area of the filament. It's a tiny metal sting, that would be hard to find out, but if you really want to, break open a bulb and measure its length and diameter with a caliper. Estimate surface area using the surface area of a cylinder formula A=πdh. Forget the ends, they're too small to bother with.
If you don't want to go through the trouble of breaking a bulb, make a wild guesstimate. 0.6m length and $5\cdot10^{-4}$ diameter, being generous. area of 0.001 m2. So $2.7\cdot10^{-187}$photons/s/m^2/sr/µm, then with the given surface area, $2.7*10^{-190}$ photons/s/sr/µm. That's 8.5 photons every $10^{186}$ years. Maybe if you watch 100,000,000,000,000 light bulbs you might catch an X-ray within your lifetime.
