How to write 1 tuple as sets? A 2-tuple is $(a, b) = \{\{a\}, \{a, b\}\}$
What about a 1 tuple? Is it $(a) = \{\{a\}\}$?
Then if $a = b$: $(a, b) = (a, a) = \{\{a\}, \{a, a\}\} = \{\{a\}, \{a\}\} = \{\{a\}\}$
So $(a, a) = (a)$?
 A: In set theory, we usually (see page 18 in Hrbacek, K. and Jech, T., 1999 and page 7 in Jech, T., 2000) define $n$ tuples as follows.
Definition 1. Suppose $n$ is a natural number and $x_0,\cdots,x_{n-1}$ are sets. Set
\begin{align*}
(\,)&:=\varnothing,\\
(x_0)&:=x_0,\\
(x_0,x_1)&:=\{\{x_0\},\{x_0,x_1\}\},\\
\vdots\quad\qquad&\qquad\qquad~\vdots\\
(x_0,\cdots,x_{n-2},x_{n-1})&:=((x_0,\cdots,x_{n-2}),x_{n-1}).
\end{align*}
Remark 2. As you see, $0$ tuples and $1$ tuples has nothing to do with Kuratowski's definition for ordered pairs$^*$, while $n$ tuples with $n\geq 2$ are based on Kuratowski's definition for ordered pairs. The reason that we set $0$ tuples to be the empty set is clear, and the reason that we set $1$ tuples to be the element laying in itself is to coincide with definitions for unary relations (any subset of $X$ is a unary relation on $X$) and with definitions for unary Cartesian products ($X^1=X$ which selects elements of itself as its elements).
Furthermore, keeping the definitions for $0$ tuples, $1$ tuples and $2$ tuples unchanged, we can also define $n$ tuples with $n\geq 3$ to be functions with domain $n$.
Definition 3. Suppose $n$ is a natural number no less than $3$ and $x_0,\cdots,x_{n-1}$ are sets. Set
$$(x_0,\cdots,x_{n-1}):=\{(0,x_0),\cdots,(n-1,x_{n-1})\}.$$
Remark 4. Note that $2$ tuples (ordered pairs$^\dagger$) can't be defined as functions with domain $2$, since the definitions for functions depends on relations while the definitions for relations depends on $2$ tuples, and so the definition for $2$ tuples should only be Kuratowski's or similar (for example, Hausdorff's or Wiener's) way.
Remark 5. Both of the two definitions for $n$ tuples with $n\geq 3$ have their own advantages: (1) Definition 1 has real order while Definition 3 has imaginary order since the elements of functions have no order and the imaginary order follows from the order of ordinals (natural numbers); (2) Definition 3 is clearly simpler than the first one. In fact, since we also define sequences as functions with ordinals as domains, if we adopt Definition 1, then tuples can only be regarded as finite sequences while in fact not, and if we adopt Definition 3 then $n$ tuples are indeed $n$ sequences (finite sequences).
Anyway, $(a,a)=\{\{a\}\}\neq a=(a)$. Note that by Axiom of Foundation/Regularity, we can by induction show that: if $n$ is a non-zero natural number, then $a\neq \underbrace{\{\cdots\{}_{n\text{ many}}a\underbrace{\}\cdots\}}_{n\text{ many}}$.

$*$ By the way, Kuratowski's definition for ordered pairs is great although it seems to be very simple at first glance since it transforms the order of elements laying in the ordered pairs into the difference of sets (not difference operation of sets) of elements laying in the ordered pairs,  and based on it we can define other basic mathematical concepts such as relations, functions and so on.
$\dagger$ Considering of no mathematical definition, there are many equivalent names to $2$ tuples: couple, double, ordered pair, two-ple, twin, dual, duad, dyad, twosome. So it's better to define $2$ tuples and ordered pairs to be the same object, while @Gregory Nisbet 's new definition for $(a,b)$ (i.e., 2 tuples) and definition for $(a,b)_K$ (i.e., Kuratowski's definition for ordered pairs) are different objects. Without this, it's also ok to define $2$ tuples in @Gregory Nisbet 's new way. By the way, in fact @Gregory Nisbet 's new way is the same as Definition 3 for $n$ tuples with $n\geq 3$ as above.
A: The definition you are using for an ordered pair is called a Kuratowski pair.
$$ (a, b)_K = \{\{a\}, \{a, b\}\} $$
Unfortunately, it does not immediately generalize beyond 2 elements.
For example, $\{\{a\}, \{a, b\}, \{a, b, c\}\}$ is not a viable definition of an ordered triple because it cannot distinguish $(a, a, b)$ and $(a, b, b)$. This doesn't directly address the singleton case, but it does show that the Kuratowski pair is not a construction for encoding tuples as sets.
One thing you can do if you want to represent tuples of arbitrary length is to represent them as partial functions* with domain $\mathbb{N}$, for example.
$$ (a,) = \{(1, a)_K\} \\
(a, b) = \{(1, a)_K, (2, b)_K \} \\
(a, b, c) = \{(1, a)_K, (2, b)_K, (3, c)_K\} \\
\textit{and so on} $$

Note that in this definition, we're using the Kuratowski pair construction to build our definition of a 2-tuple $(a, b) = \{(1, a)_K, (2, b)_K\}$ rather than directly using the pair as our definition of a 2-tuple.
*Also note that, if we want to define an $n$-ary "function" as a set of $n+1$-tuples where every element of the domain is associated with a unique element of the codomain, then tuples themselves are, strictly speaking, not functions. However, the same intuition from the encoding of a function carries over to the encoding of tuples.
