A formula with only one $0$ that evaluates to a given integer Just found this math puzzle online:

Original puzzle: Using one zero (and no other numbers) and
  mathematical (including trigonometric and advanced) operations, how
  can you achieve a final result of 6?
Advanced one: Using only trigonometric functions and a single instance
  of the number zero, derive a forumula to calculate any positive
  integer n.

I am sure there is an answer somewhere online but I can't find one - very interesting.
And the answer I can think of for the original one is

$$\lim_{x\to0}\;(a^x+ a^x+ a^x+ a^x+ a^x+ a^x)$$

 A: A completely different (trig free) approach:
$$\lceil \exp(\exp(0))\rceil! = \lceil \exp(1)\rceil!  = \lceil 2.718281828\ldots\rceil! = 3!=6$$
A: This is a puzzle from the XKCD wiki (0 = 6 problem). The answer is available in the discussion tab.
A: This may not be the most efficient solution for 6, but it works in general.  First, note that $cos(0) = 1$, so we can start with $1$.  The important formulas are then

(a) $\tan(\cot^{-1}(x)) = \frac{1}{x}$
(b) $\sin(\cot^{-1}(x)) = \frac{1}{\sqrt{1 + x^2}}$

These can be checked by drawing a triangle with the appropriate sides lengths.  Then, starting with $\sqrt{n}$, applying (b) and then (a) gives $\sqrt{n+1}$.  Thus, starting with $\sqrt{n} = n = 1$, repeated applications of (a) and (b) can give the square root of any natural number.  Since every natural number is the square root of another natural number, we can get any natural number this way.
Edit: After looking at the link Eugene gave below, this same process can be done more simply by iterating

$\sec( \tan^{-1}(x)) = \sqrt{x^2+1}$

A: Two solutions:


*

*Let $S(n)$ denote the successor operation over the natural numbers, that is $S(n)=n+S(0)$.
$$S(S(S(S(S(S(0))))))=6$$

*Similarly using the cardinality operator, the power set operation $P(x)$, and set difference, we can write:
$$6 = \big|P(P(P(P(\{n\in\mathbb N\mid n<0\})))\setminus P(P(\{n\in\mathbb N\mid n<0\}))\big|$$

Now, why this question generally annoys me? Well, coming from a logic and set theory point of view I am aware that $0$ is merely a syntactic creature. The question asks something about how many ways there are to write a certain constant by a formula.
There is no specification of the language, but it is somewhat implied that the operations should be "mathematical" in their nature. I use quotation because of course one can always define $f$ to be some bizarre permutation of any set containing both $0$ and $6$ and simply write $f(0)=6$.
While the question clearly means "high-school'ish" mathematical operations, it is ill-defined, almost as the questions of the form "Guess the next number in the sequence: $a,b,c,\ldots$" - the mathematical answer is usually $42$.
A: (0!+0!+0!)!=6
As 0!=1 then it becomes (1+1+1)! => 3! = 6.
