Question: Is the integral $$I=\int \_0 ^{\infty} \sin (x)\sin (x^2)~\mathrm dx $$ convergent or divergent? Thus we have $$I=\frac {1}{4}\int \_{-\infty} ^{\infty} \left(\cos \left(\frac {x^2-x}{2}\right)-\cos \left(\frac{x^2+x}{2}\right)\right)~\mathrm dx $$ I have not been able to go any further. This question was asked in calculus class 1 so hope there is an easy way like approximation of integral or any series to go about.Thanks!

Answer: 
The number of combinations in which at least three digits are the same, equals the number of all combinations minus the ones where at most two digits are the same. We can consider five cases:

1. No double digits: ${10 \choose 8}8!$ options;
2. One double digit, six single ones: ${10 \choose 1} {8 \choose 2} {9 \choose 6} 6!$ options;
3. Two double digits, four single ones: ${10 \choose 2} {8 \choose 2, 2} {8 \choose 4} 4!$ options;
4. Three double digit, two single ones: ${10 \choose 3} {8 \choose 2, 2, 2} {7 \choose 2} 2!$ options;
5. Four double digits: ${10 \choose 4} {8 \choose 2, 2, 2, 2}$ options.

As such, the number of combinations in which at least three digits are the same, equals:

$$10^8 - {10 \choose 8}8! - {10 \choose 1} {8 \choose 2} {9 \choose 6} 6! - {10 \choose 2} {8 \choose 2, 2} {8 \choose 4} 4! - {10 \choose 3} {8 \choose 2, 2, 2} {7 \choose 2} 2! - {10 \choose 4} {8 \choose 2, 2, 2, 2} = 36,269,200$$

**Assuming that all $10^8$ bills are used**, the probability of getting a dollar bill with a serial number with at least three similar digits equals:

$$\frac{36,269,200}{100,000,000} \approx 0.3627$$
Assuming we want *at least* three digits to be identical.

I cannot think about anything faster than that:

$A\_3$=number of ways to have exactly 3 ones $=\binom{8}{3}\*9^5$

$A\_{33}$=number of ways to have exactly 3 ones and 3 twos $=\binom{8}
{3}\binom{6}{3}\*8^2$

$A\_4$=number of ways to have exactly 4 ones $=\binom{8}{4}\*9^4$

$A\_{43}$=number of ways to have exactly 4 ones and 3 twos $=\binom{8}{4}\binom{4}{3}\*8$

$A\_{44}$=number of ways to have exactly 4 ones and 4 twos $=\binom{8}{4}$

$A\_5$=number of ways to have exactly 5 ones $=\binom{8}{5}\*9^3$

$A\_{53}$=number of ways to have exactly 5 ones ans 3 twos $=\binom{8}{5}$

$A\_6$=number of ways to have exactly 6 ones $=\binom{8}{6}\*9^2$

$A\_7$=number of ways to have exactly 7 ones $=\binom{8}{7}\*9$

$A\_8$=number of ways to have exactly 8 ones $=1$

Then the answer will be $10(A\_3+A\_4+A\_5+A\_6+A\_7+A\_8)-\binom{10}{2}(A\_{33}+A\_{43}+A\_{44}+A\_{53})$