Inspired by A discontinuous construction: Does there exist a function $a \colon [0,1] \to (0,\infty)$ and a family $\{D_x \colon x \in [0,1]\}$ of countable, dense subsets of $[0,1]$ with $\bigcup_{x \in [0,1]} D_x = [0,1]$ and $\sum_{r \in D_x} a(r) < \infty$ for all $x \in [0,1]$,

1$\begingroup$ Sure, it's not a hard exercise to use a Vitali set to engineer something like this. $\endgroup$ – Asaf Karagila Feb 23 at 11:54

$\begingroup$ Thank you. I shall try it. $\endgroup$ – Dieter Kadelka Feb 23 at 12:01

$\begingroup$ The Vitali set $V$ allows the definition of $\cal{D} := \{(v + \mathbb{Q}) \cap [0,1] \colon v \in V\}$. The $D \in \cal{D}$ are either identical or disjoint. This is essential for defining $a$ whatever we like. Asaf Karagila thank you again. $\endgroup$ – Dieter Kadelka Feb 23 at 12:25
The relation
$$
x\sim y \quad \iff \quad xy\in\mathbb{Q}
$$
is an equivalence relation that partitions $[0,1]$ into countable sets of the form $[t]=(t+\mathbb{Q})\cap [0,1]$.
The set $\{[t]:\,t\in [0,1]\}$ (the set of all equivalence classes of the relation) has the same cardinality as $[0,1]$.
Let
$$
\psi:[0,1]\to\{[t]:\, t\in [0,1]\}
$$
be a bijection. For $x\in [0,1]$ we define $D_x=\psi(x)$. Since the sets $D_x$ are precisely equivalence classes of $\sim$, we have that they are countable, dense and $\bigcup_{x\in [0,1]} D_x=[0,1]$.
Each of the sets $[t]=(t+\mathbb{Q})\cap [0,1]$ is countable infinite. Let
$$
\phi_{[t]}:[t]\to\{n^{2}:\, n\in\mathbb{N}\}
$$ be a bijection defined for each of the equivalence classes.
Finally we define
$$
a:[0,1]\to (0,\infty)
\quad\text{by}\quad
a(x)=\phi_{[x]}(x).
$$
It is easy to see that the function $a$ has the desired property since
$D_x=[t]$ for some $t$ and hence
$$
\sum_{r\in D_x} a(r)=
\sum_{r\in [t]}\phi_{[r]}(r)=
\sum_{r\in [t]}\phi_{[t]}(r)=
\sum_{n\in\mathbb{N}} n^{2}=\frac{\pi^2}{6}.
$$
In the second equality we used the fact that $[r]=[t]$ for $r\in [t]$ which is a property of any equivalence relation.