1 Introduction

Modelling and studying functions with complicated local structure (singular (for example, [7, 10, 15, 22]), nowhere monotonic ( [12, 17]), and nowhere differentiable functions (for example, see [4, 13], etc.)) is one of the complex problems introduced by a number of famous mathematicians. For example, Banach, Bolzano, Bush, Darboux, Dini, Dirichlet, Rieman, Du Bois-Reymond, Hardy, Gerver, Minkowski, Weierstrass, Zamfrescu and other scientists investigated this problem. Brief historical remarks were given in [2, 16]. For constructing such functions, using various expansions ([9]) of real numbers is useful.

Interest in such functions is explained by their applications in different areas of mathematics, as well as in physics, economics, technology, etc. for modelling real objects, processes, and phenomena (for example, see [1, 3, 6, 8, 19,20,21]).

In [10], Salem introduced the following very simple example of singular functions:

$$\begin{aligned} s(x)=s\left( \Delta ^q _{i_1i_2...i_k...}\right) =\beta _{i_1}+ \sum ^{\infty } _{k=2} {\left( \beta _{i_k}\prod ^{k-1} _{l=1}{p_l}\right) }=y=\Delta ^{P_q} _{i_1i_2...i_k...}, \end{aligned}$$

where \(1<q\) is a fixed positive integer, \(p_j>0\), and \(\sum ^{q-1} _{j=0}{p_j}=1\) for all \(j=0,1, \dots , q-1\). Also, \(\beta _0=0\) and \(0<\beta _{i_k}=p_0+p_1+\dots +p_{i_{k}-1}<1\) for \(i_k\ne 0\). This function is a singular function but its generalizations can be non-differentiable functions or those that do not have a derivative on a certain set. There is considerable research devoted to the Salem function and its generalizations (for example, see [2, 5, 11, 12, 17, 18] and the references in these papers).

The present paper extends the paper [18] and is devoted to modelling and investigating generalizations of the Salem function by generalized shifts in terms of the nega-q-ary representation (alternating expansions). The used techniques are more complicated for the case of alternating expansions.

Let us consider the basic notions and properties.

Let \(1<q\) be a fixed positive integer, \(\Theta \equiv \{0,1,\dots ,q-1\}\) be an alphabet, and \((i_k)\) be a sequence of numbers such that \(i_k \in \Theta \) for all \(k\in {\mathbb {N}}\). Then

$$\begin{aligned} \left[ -\frac{q}{q+1},\frac{1}{q+1}\right] \ni x=\Delta ^{-q} _{i_1i_2...i_k...}\equiv \frac{i_1}{-q}+\frac{i_2}{(-q)^2}+\dots +\frac{i_k}{(-q)^k}+\dots .\nonumber \\ \end{aligned}$$
(1)

The last-mentioned expansion is called a nega-q-ary expansion, and the corresponding notation \(\Delta ^{-q} _{i_1i_2...i_k...}\) is the nega-q-ary representation of x. The term “nega” is used because the base of this numeral system is a negative number.

Let us note that certain numbers from \(\left[ -\frac{q}{q+1}, \frac{1}{q+1}\right] \) have two different nega-q-ary representations of form (1), i.e.,

$$\begin{aligned} \Delta ^{-q} _{i_1i_2\ldots i_{m-1}i_m[q-1]0[q-1]0[q-1]\ldots }=\Delta ^{-q} _{i_1i_2\ldots i_{m-1}[i_m-1]0[q-1]0[q-1]\ldots }. \end{aligned}$$

Such numbers are called nega-q-rational. The other numbers in \(\left[ -\frac{q}{q+1}, \frac{1}{q+1}\right] \) are called nega-q-irrational and have a unique nega-q-ary representation.

Let \(c_1,c_2,\dots , c_m\) be a fixed ordered tuple of integers such that \(c_j\in \{0,1,\dots , q-~1\}\) for \(j=\overline{1,m}\).

A cylinder \(\Lambda ^{-q} _{c_1c_2...c_m}\) of rank m with base \(c_1c_2\ldots c_m\) is the following set

$$\begin{aligned} \Lambda ^{-q} _{c_1c_2...c_m}\equiv \{x: x=\Delta ^{-q} _{c_1c_2...c_m i_{m+1}i_{m+2}\ldots i_{m+k}\ldots }\}. \end{aligned}$$

That is, any cylinder \(\Lambda ^{-q} _{c_1c_2...c_m}\) is a closed interval of the form:

$$\begin{aligned} \left[ \Delta ^{-q} _{c_1c_2...c_m[q-1]0[q-1]0[q-1]...}, \Delta ^{-q} _{c_1c_2...c_m0[q-1]0[q-1]0[q-1]...}\right] \text {whenever}\; m \;\text {is even;}\\ \left[ \Delta ^{-q} _{c_1c_2...c_m0[q-1]0[q-1]0[q-1]...}, \Delta ^{-q} _{c_1c_2...c_m[q-1]0[q-1]0[q-1]...}\right] \text {whenever}\; m \; \text {is odd.} \end{aligned}$$

Now, let us consider the notions of certain shifts. Such operators were desrcribed in [18] for positive Cantor series. Here these operators will be considered for the case of nega-q-ary expansions.

The shift operator \(\sigma \) of expansion (1) is of the following form

$$\begin{aligned} \sigma (x)=\sigma \left( \Delta ^{-q} _{i_1i_2\ldots i_k\ldots }\right) =\sum ^{\infty } _{k=2}{\frac{i_k}{(- q)^{k-1}}}=-q\Delta ^{-q} _{0i_2\ldots i_k\ldots }=\Delta ^{-q} _{i_2i_3i_4i_5i_6i_7\ldots i_k\ldots }. \end{aligned}$$

It is easy to see that

$$\begin{aligned} \begin{aligned} \sigma ^n(x)&=\sigma ^n\left( \Delta ^{-q} _{i_1i_2\ldots i_k\ldots }\right) \\&=\sum ^{\infty } _{k=n+1}{\frac{i_k}{(- q)^{k-n}}}=(-q)^n\Delta ^{-q} _{\underbrace{0\ldots 0}_{n}i_{n+1}i_{n+2}\ldots }=\Delta ^{-q} _{i_{n+1}i_{n+2}\ldots }. \end{aligned} \end{aligned}$$

Therefore,

$$\begin{aligned} x=\sum ^{n}_{k=1}{\frac{i_k}{(-q)^k}}+\frac{1}{(-q)^n}\sigma ^n(x). \end{aligned}$$
(2)

In [14] (see also [18]), the notion of the generalized shift operator was considered for Cantor series (mainly, for positive).

Let x be a number represented by expansion (1).The generalized shift operator is a map of the form

$$\begin{aligned} \sigma _m(x)=\sum ^{m-1} _{k=1}{\frac{i_k}{(- q)^k}}+\frac{i_{m+1}}{(-q)^m}+\sum ^{\infty } _{l=m+2}{\frac{i_l }{(-q)^{l-1}}}. \end{aligned}$$

One can note that

$$\begin{aligned} \sigma _m(x)=-qx-\frac{i_m}{(-q)^m}+(q+1) \Delta ^{-q} _{i_1i_2...i_{m}00000...}, \end{aligned}$$
(3)

where \(\sigma _1=\sigma \).

The following remark gives auxiliary properties for modelling functions.

Remark 1

Suppose \(x=\Delta ^{-q} _{i_1i_2...i_k...}\) and m is a fixed positive integer; then

$$\begin{aligned}{} & {} \sigma _{m}(x)=\sigma _{m}\left( \Delta ^{-q} _{i_1i_2...i_k...}\right) =\Delta ^{-q} _{i_1i_2...i_{m-1}i_{m+1}...},\\{} & {} \sigma _{m}\circ \sigma _{m}(x)=\sigma ^{2} _{m}(x)=\sigma _m\left( \sigma _m\left( \Delta ^{-q} _{i_1i_2...i_k...}\right) \right) \\{} & {} =\sigma _{m}\left( \Delta ^{-q} _{i_1i_2...i_{m-1}i_{m+1}...}\right) =\Delta ^{-q} _{i_1i_2...i_{m-1}i_{m+2}...}, \end{aligned}$$

as well as for two positive integers \(n_1\) and \(n_2\), the following is true:

$$\begin{aligned}{} & {} \sigma _{n_2}\circ \sigma _{n_1}(x)=\sigma _{n_2}\left( \Delta ^{-q} _{i_1i_2...i_{n_1-1}i_{n_1+1}...}\right) \nonumber \\{} & {} ={\left\{ \begin{array}{ll} \Delta ^{-q} _{i_1i_2...i_{n_2-1}i_{n_2+1}...i_{n_1-1}i_{n_1+1}...}&{}\hbox { if}\ n_1>n_2\\ \Delta ^{-q} _{i_1i_2...i_{n_1-1}i_{n_1+1}...i_{n_2-1}i_{n_2}i_{n_2+2}...}&{}\hbox { if}\ n_1<n_2\\ \Delta ^{-q} _{i_1i_2...i_{m-1}i_{m+2}...}&{}\,\text {if }n_1=n_2=m. \end{array}\right. } \end{aligned}$$
(4)

For example,

$$\begin{aligned}{} & {} \sigma _5 \circ \sigma _5 (x)=\sigma ^2 _5(x)=\sigma _5 \circ \sigma _5\left( \Delta ^{-q} _{i_1i_2\ldots i_k\ldots }\right) \\{} & {} =\sigma _5 \left( \Delta ^{-q} _{i_1i_2i_3i_4i_6i_7i_8i_9\ldots }\right) =\Delta ^{-q} _{i_1i_2i_3i_4i_7i_8i_9\ldots },\\{} & {} \sigma _1 \circ \sigma _3 (x)=\sigma _1 \circ \sigma _3\left( \Delta ^{-q} _{i_1i_2\ldots i_k\ldots }\right) =\sigma _1 \left( \Delta ^{-q} _{i_1i_2i_4i_5i_6i_7i_8i_9\ldots }\right) =\Delta ^{-q} _{i_2i_4i_5i_6i_7i_8i_9\ldots }, \end{aligned}$$

and

$$\begin{aligned}{} & {} \sigma _7 \circ \sigma _2 (x)=\sigma _7 \circ \sigma _2\left( \Delta ^{-q} _{i_1i_2\ldots i_k\ldots }\right) =\sigma _7 \left( \Delta ^{-q} _{i_1i_3i_4i_5i_6i_7i_8\ldots i_k\ldots }\right) =\Delta ^{-q} _{i_1i_3i_4i_5i_6i_7i_9\ldots }. \end{aligned}$$

Remark 2

Using the last remark, let us define an auxiliary sequence for modelling functions. Suppose \((n_k)\) is a finite fixed sequence of positive integers such that \(n_i\ne n_j\) for \(i\ne j\).To delete the digits \(i_{n_1}, i_{n_2}, \dots , i_{n_k}\) (according to this fixed order) by using a composition of the generalized shift operators in \(x=\Delta ^{-q} _{\alpha _1\alpha _2...\alpha _k...}\), we must consider an auxiliary sequence, since the last remark is true. That is, to construct

$$\begin{aligned} x_0&=\Delta ^{-q} _{\alpha _1\alpha _2...\alpha _{n_1-1}\alpha _{n_1+1}...\alpha _{n_2-1}\alpha _{n_2+1}...\alpha _{n_k-1} \alpha _{n_k+1}\alpha _{n_k+2}...\alpha _{n_k+t}...},\\&\quad \text { where }~t=1,2,3, \dots , \end{aligned}$$

let us define the sequence \(({\hat{n}}_k)\), where

$$\begin{aligned} {\hat{n}}_k= n_k-N_k, \end{aligned}$$

where \(N_k\) is the number of all numbers which are less than \(n_k\) in the finite fixed sequence \((n_1, n_2, \dots , n_k)\).

2 Modelling generalizations of the Salem function

Nowadays it is well known that functional equations and systems of functional equations are widely used in mathematics and other sciences. Modelling functions with complicated local structure by systems of functional equations is a shining example of their applications in function theory ([17]).

Suppose \((n_k)\) is a fixed sequence of positive integers such that \(n_i\ne n_j\) for \(i\ne j\) and such that for any \(n\in {\mathbb {N}}\) there exists a number \(k_0\) for which the condition \(n_{k_0}=n\) holds. Suppose \({\hat{n}}_k=n_k-N_k\) for all \(k=1,2, 3, \dots \), where \(N_k\) is the number of all numbers which are less than \(n_k\) in the finite sequence \(n_1, n_2, \dots , n_k\).

Theorem 1

Let \(P_{-q}=(p_0,p_1,\dots , p_{q-1})\) be a fixed tuple of real numbers such that \(p_i\in (-1,1)\), where \(i=\overline{0,q-1}\), \(\sum _i {p_i}=1\), and \(0=\beta _0<\beta _i=\sum ^{i-1} _{j=0}{p_j}<1\) for all \(i\ne 0\). Then the following system of functional equations

$$\begin{aligned} f\left( \sigma _{{\hat{n}}_{k-1}}\circ \sigma _{{\hat{n}}_{k-2}}\circ \ldots \circ \sigma _{{\hat{n}}_1}(x)\right) =\ddot{\beta }_{i_{n_k}}+\ddot{p}_{i_{n_k},}f\left( \sigma _{{\hat{n}}_{k}}\circ \sigma _{{\hat{n}}_{k-1}}\circ \ldots \circ \sigma _{{\hat{n}}_1}(x)\right) ,\nonumber \\ \end{aligned}$$
(5)

where \(x=\Delta ^{-q} _{i_1i_2...i_k...}\), \(k=1,2, \dots \), and \(\sigma _0(x)=x\), has the unique solution

$$\begin{aligned} h(x)=\ddot{\beta }_{i_{n_1}}+\sum ^{\infty } _{k=2}{\left( \ddot{\beta }_{i_{n_k}}\prod ^{k-1} _{r=1}{\ddot{p}_{i_{n_r}}}\right) } \end{aligned}$$

in the class of determined and bounded on \(\left[ -\frac{q}{q+1}, \frac{1}{q+1}\right] \) functions.

Here

$$\begin{aligned} \ddot{\beta }_{i_{n_k}}={\left\{ \begin{array}{ll} \beta _{i_{n_k}}&{}{}\quad \text{ if }\,\,\, n_k \,\,\, \text{ is } \text{ even } \\ \beta _{q-1-i_{n_k}}&{}{}\quad \text{ if }\,\,\, n_k \,\,\,\text{ is } \text{ odd } \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} \ddot{p}_{i_{n_k}}={\left\{ \begin{array}{ll} p_{i_{n_k}}&{}\quad \text {if}\,\,\, n_k \,\, \text { is even }\\ p_{q-1-i_{n_k}}&{}\quad \text {if} \,\,\, n_k \,\, \text {is odd.} \end{array}\right. } \end{aligned}$$

Proof

Since h is a function determined on \(\left[ -\frac{q}{q+1}, \frac{1}{q+1}\right] \), using system (5), we obtain

$$\begin{aligned}&h(x)=\ddot{\beta }_{i_{n_1}}+\ddot{p}_{i_{n_1}}f(\sigma _{{\hat{n}}_1}(x))\\ {}&=\ddot{\beta }_{i_{n_1}}+\ddot{p}_{i_{n_1}}(\ddot{\beta }_{i_{n_2}}+\ddot{p}_{i_{n_2}}f(\sigma _{{\hat{n}}_2}\circ \sigma _{{\hat{n}}_1}(x)))=\dots \\ {}&\dots =\ddot{\beta }_{i_{n_1}}+\ddot{\beta }_{i_{n_2}}\ddot{p}_{i_{n_1}}+\ddot{\beta }_{i_{n_3}}\ddot{p}_{i_{n_1}}\ddot{p}_{i_{n_2}}+\dots +\ddot{\beta }_{i_{n_k}}\prod ^{k-1} _{r=1}{\ddot{p}_{i_{n_r}}}\\{}&+\left( \prod ^{k} _{t=1}{\ddot{p}_{i_{n_t}}}\right) h(\sigma _{{\hat{n}}_k}\circ \dots \circ \sigma _{{\hat{n}}_2}\circ \sigma _{{\hat{n}}_1}(x)). \end{aligned}$$

So,

$$\begin{aligned} h(x)= & {} \ddot{\beta }_{i_{n_1}}+\sum ^{\infty }_{k=2}{\left( \ddot{\beta }_{i_{n_k}}\prod ^{k-1}_{r=1}{\ddot{p}_{i_{n_r}}}\right) } \end{aligned}$$

since h is a function determined and bounded on the domain, as well as

$$\begin{aligned} \lim _{k\rightarrow \infty }{h(\sigma _{{\hat{n}}_k}\circ \dots \circ \sigma _{{\hat{n}}_2}\circ \sigma _{{\hat{n}}_1}(x))\prod ^{k} _{t=1}{\ddot{p}_{i_{n_t}}}}=0, \end{aligned}$$

where

$$\begin{aligned} \prod ^{k} _{t=1}{\ddot{p}_{i_{n_t}}}\le \left( \max _{0\le i\le q-1}{\ddot{p}_i}\right) ^k\rightarrow 0, ~~~ k\rightarrow \infty . \end{aligned}$$

\(\square \)

Example 1

Suppose

$$\begin{aligned} (n_k)=(3, 7, 9, 5, 8, 12, 4, 6, 10, 11, 13, 14, 15, 16, 17, 18, \dots ). \end{aligned}$$

Then, using arguments explained in Remark 2, we have the following: \({\hat{n}}_1=n_1=3\),

$$\begin{aligned}&{\hat{n}}_2=n_2-1=7-1=6, \quad {\hat{n}}_3=n_3-2=9-2=7, \quad {\hat{n}}_4=n_4-1=5-1=4,\\&{\hat{n}}_5=n_5-3=5, \quad {\hat{n}}_6=n_6-5=7, \quad {\hat{n}}_7=n_7-1=3,\\&{\hat{n}}_8=n_8-3=3, \quad {\hat{n}}_9=n_9-7=3, \quad {\hat{n}}_{10}=n_{10}-8=3, \end{aligned}$$

\( {\hat{n}}_{10+k}=n_{10+k}- (n_{10+k}-3)=3\) for \(k=1, 2, 3, \dots \).

So, we obtain the function

$$\begin{aligned} h(x)=\ddot{\beta }_{i_{n_1}}+\sum ^{\infty } _{k=2}{\left( \ddot{\beta }_{i_{n_k}}\prod ^{k-1} _{r=1}{\ddot{p}_{i_{n_r}}}\right) } \end{aligned}$$

according to the sequence \((n_k)\). That is, for \(x=\Delta ^{-q} _{i_1i_2...i_k...}\), we have

$$\begin{aligned} y={} & {} h(x)=\beta _{q-1-i_3(x)}+\beta _{q-1-i_7(x)}p_{q-1-i_3(x)}\\{} & {} +\beta _{q-1-i_9(x)}p_{q-1-i_3(x)}p_{q-1-i_7(x)}\\{} & {} +\beta _{q-1-i_5(x)}p_{q-1-i_3(x)}p_{q-1-i_7(x)}p_{q-1-i_9(x)}\\{} & {} +\beta _{i_8(x)}p_{q-1-i_3(x)}p_{q-1-i_7(x)}p_{q-1-i_9(x)}p_{q-1-i_5(x)}+\dots . \end{aligned}$$

3 Properties of the main object of the research

Modelling of certain generalizations of the Salem function is considered in the last section. In this section, the main attention is given to investigations of such properties of modeled functions as the continuity and the monotonicity, integral properties, and a brief description of a distribution function.

Theorem 2

The following properties hold:

  1. (1)

    The function h is continuous at any nega-q-irrational point of \(\left[ {-}\frac{q}{q{+}1}, \frac{1}{q{+}1}\right] \).

  2. (2)

    The function h is continuous at the nega-q-rational point

    $$\begin{aligned} x_0=\Delta ^{-q} _{i_1i_2\ldots i_{m-1}i_m[q-1]0[q-1]0[q-1]\ldots }=\Delta ^{-q} _{i_1i_2\ldots i_{m-1}[i_m-1]0[q-1]0[q-1]\ldots } \end{aligned}$$

    whenever a sequence \((n_k)\) is such that the following conditions hold:

    • \(k_0=\max \{k: n_k \in \{1,2,\dots , m\}\}\), \(n_{k_0}=m\), and \(n_1, n_2, \dots , n_{k_0-1}\in \{1, 2, \dots , m-1\}\).

    • the digit map \(\psi : k \rightarrow n_k\) is such that to each even (odd) number k it assigns only an even (odd) number \(n_k\) in all positions after \(n_{k_0}=m\).

    Otherwise, the nega-q-rational point \(x_0\) is a point of discontinuity.

  3. (3)

    The set of all points of discontinuity of the function h is a countable, finite, or empty set. It depends on the sequence \((n_k)\).

Proof

One can begin with a remark on some notations.

Remark 3

For the compactness of notations, consider the notation \(\Delta ^{h(x)} _{i_{n_1}i_{n_2}...i_{n_k}...}\) as the image of \(\Delta ^{-q} _{i_1i_2...i_k...}\) under the map h. Indeed, this can be written as follows:

$$\begin{aligned} h\left( \Delta ^{-q} _{i_1i_2...i_k...}\right) =\Delta ^{h(x)} _{\ddot{i}_{n_1}\ddot{i}_{n_2}...\ddot{i}_{n_{k}}...}, \end{aligned}$$

where

$$\begin{aligned} \ddot{i}_{n_k}={\left\{ \begin{array}{ll} {i_{n_k}}&{}\quad \text {if}\,\,\, n_k \text { is even }\\ {q-1-i_{n_k}}&{}\quad \text {if}\,\,\, n_k \text { is odd.} \end{array}\right. } \end{aligned}$$

One can remark that any fixed function h is given by a fixed sequence \((n_k)\) described above. One can write our mapping as follows:

$$\begin{aligned} h: x=\Delta ^{-q} _{i_1i_2...i_k...}\rightarrow ~\ddot{\beta }_{i_{n_1}}+\sum ^{\infty } _{k=2}{\left( \ddot{\beta }_{i_{n_k}}\prod ^{k-1} _{r=1}{\ddot{p}_{i_{n_r}}}\right) }=\Delta ^{h(x)} _{i_{n_1}i_{n_2}...i_{n_k}...}=h(x)=y. \end{aligned}$$

Let \(x_0=\Delta ^{-q} _{i_1i_2...i_k...}\) be an arbitrary nega-q-irrational number from \(\left[ -\frac{q}{q+1}, \frac{1}{q+1}\right] \). Let \(x=\Delta ^{-q} _{\gamma _1\gamma _2...\gamma _k...}\) be a nega-q-irrational number such that the condition \(\gamma _{n_j}=i_{n_j}\) holds for all \(j=\overline{1,k_0}\), where \(k_0\) is a certain positive integer. That is,

$$\begin{aligned}{} & {} x=\Delta ^{-q} _{\gamma _1...\gamma _{n_1-1}i_{n_1}\gamma _{n_1+1}...\gamma _{n_2-1}i_{n_2}... \gamma _{(n_{(k_0-1)}+1)}...\gamma _{(n_{k_0}-1)}i_{n_{k_0}}\gamma _{n_{k_0}+1}...\gamma _{n_{k_0}+k}...},\\{} & {} ~k=1,2,\dots . \end{aligned}$$

Then

$$\begin{aligned} h(x_0)&=\Delta ^{h(x)} _{i_{n_1}i_{n_2}...i_{n_{k_0}}i_{n_{k_0+1}}...},\\ h(x)&= \Delta ^{h(x)} _{i_{n_1}i_{n_2}...i_{n_{k_0}}\gamma _{n_{k_0+1}}...\gamma _{n_{k_0}+k}...}. \end{aligned}$$

Since h is a bounded function, \( h(x) \le 1\), we get \(h(x)-h(x_0)=\)

$$\begin{aligned}{} & {} =\left( \prod ^{k_0} _{j=1}{\ddot{p}_{i_{n_j}}}\right) \left( \ddot{\beta }_{\gamma _{n_{k_0+1}}}+\sum ^{\infty } _{t=2}{\left( \ddot{\beta }_{\gamma _{n_{k_0+t}}}\prod ^{k_0+t-1} _{r=k_0+1}{\ddot{p}_{\gamma _{n_r}}}\right) }-\ddot{\beta }_{i_{n_{k_0+1}}}\right. \\{} & {} \quad \left. -\sum ^{\infty } _{t=2}{\left( \ddot{\beta }_{i_{n_{k_0+t}}}\prod ^{k_0+t-1} _{r=k_0+1}{\ddot{p}_{i_{n_r}}}\right) }\right) \\{} & {} =\left( \prod ^{k_0} _{j=1}{\ddot{p}_{i_{n_j}}}\right) \left( h(\sigma _{{\hat{n}}_{k_0}}\circ \ldots \sigma _{{\hat{n}}_2} \circ \sigma _{{\hat{n}}_1}(x))-h(\sigma _{{\hat{n}}_{k_0}}\circ \ldots \sigma _{{\hat{n}}_2} \circ \sigma _{{\hat{n}}_1}(x_0))\right) , \end{aligned}$$

and

$$\begin{aligned} |h(x)-h(x_0)|\le \delta \prod ^{k_0} _{j=1}{\ddot{p}_{i_{n_j}}}\le \delta \left( \max \{p_0,\dots , p_{q-1}\}\right) ^{k_0}\rightarrow 0 ~~~~~~~(k_0\rightarrow \infty ). \end{aligned}$$

Here \(\delta \) is a certain real number.

So, \(\lim _{x\rightarrow x_0}{h(x)}=h(x_0)\), i.e., the function h is continuous at any nega-q-irrational point.

Let \(x_0\) be a nega-q-rational number, i.e.,

$$\begin{aligned} x_0=x^{(1)} _0=\Delta ^{-q} _{i_1i_2\ldots i_{m-1}i_m[q-1]0[q-1]0[q-1]\ldots }=\Delta ^{-q} _{i_1i_2\ldots i_{m-1}[i_m-1]0[q-1]0[q-1]\ldots }=x^{(2)} _0. \end{aligned}$$

Then there exist positive integers \(k^{*}\) and \(k_0\) such that

$$\begin{aligned} y_1&= h\left( x^{(1)} _0\right) =\Delta ^{h(x)} _{i_{n_1}i_{n_2}...i_{n_{k^{*}}}...i_{n_{k_0}}\breve{\iota }\breve{\iota }\breve{\iota }\breve{\iota }...},\\ y_2&=h\left( x^{(2)} _0\right) =\Delta ^{h(x)} _{i_{n_1}i_{n_2}...i_{n_{k^{*}-1}}[i_{n_{k^{*}}}-1]i_{n_{k^{*}+1}}...i_{n_{k_0}} \breve{\iota }\breve{\iota }\breve{\iota }\breve{\iota }...}, \end{aligned}$$

where \(\breve{\iota }\in \{0, q-1\}\). Here \(n_{k^{*}}=m\), \(n_{k^{*}}\le n_{k_0}\), and \(k_0\) is a number such that \(i_{n_{k_0}}\in \{i_1, \dots , i_{m-1}, i_m\}\) and \({k_0}\) is the maximum position of any number from \(\{1,2,\dots , m\}\) in the sequence \((n_k)\).

Since the representation \(\Delta ^{h(x)} _{i_{1}i_{2}...i_{k}...}\) is an analytic representation of numbers for the case of positive \(p_j\) (based on arguments from [10], Section 2 in [17], and [11, 12, 18]), and using definitions of \(\ddot{\beta }_{i_{n_k}}\) and \(\ddot{p}_{i_{n_k}}\), we obtain that for the digit map \(\psi : k \rightarrow n_k\), which to each even (odd) number k assigns only an even (odd) number \(n_k\) in all positions after \(n_{k_0}=m\), the conditions hold: \(h(x^{(1)} _0)-h(x^{(2)} _0)=0.\)

Since the Salem function is a strictly increasing function and using the case of a nega-q-ary irrational number, let us consider the limits

$$\begin{aligned} \lim _{x\rightarrow x_0+0}{h(x)}= & {} \lim _{x\rightarrow x^{(1)} _0}{h(x)}=g(x^{(1)} _0)=y_1,~~~\\ \lim _{x\rightarrow x_0-0}{h(x)}= & {} \lim _{x\rightarrow x^{(2)} _0}{h(x)}=h(x^{(2)} _0)=y_2. \end{aligned}$$

Whence theorem’s conditions hold. The set of all points of discontinuity of the function h is a countable, finite, or empty set. It depends on the sequence \((n_k)\). \(\square \)

Suppose \((n_k)\) is a fixed sequence and \(c_{n_1}, c_{n_2}, \dots , c_{n_r}\) is a fixed tuple of numbers \(c_{n_j}\in \{0,1,\dots , q-1\}\), where \(j=\overline{1,r}\) and r is a fixed positive integer.

Let us consider the following set

$$\begin{aligned} {\mathbb {S}}_{-q, (c_{n_r})}\equiv \left\{ x: x=\Delta ^{-q} _{i_1i_2...i_{n_1-1}\overline{c_{n_1}}i_{n_1+1}...i_{n_2-1} \overline{c_{n_2}}...i_{n_{r}-1}\overline{c_{n_r}}i_{n_r+1}...i_{n_r+k}...}\right\} , \end{aligned}$$

where \(k=1,2,\dots \), and \(\overline{c_{n_j}}\in \{c_{n_1}, c_{n_2}, \dots , c_{n_r}\}\) for all \(j=\overline{1,r}\). This set has non-zero Lebesgue measure (for example, similar sets are investigated in terms of other representations of numbers in [14]). It is easy to see that \(\mathbb S_{-q, (c_{n_r})}\) maps to

$$\begin{aligned} h\left( {\mathbb {S}}_{-q, (c_{n_r})}\right) \equiv \left\{ y: y=\Delta ^{h(x)} _{c_{n_1} c_{n_2}\dots c_{n_r}i_{n_{r+1}}...i_{n_{r+k}}...}\right\} \end{aligned}$$

under h.

For a value \(\mu _h \left( {\mathbb {S}}_{-q, (c_{n_r})}\right) \) of the increment, the following is true.

$$\begin{aligned}{} & {} \mu _h \left( {\mathbb {S}}_{-q, (c_{n_r})}\right) =h\left( \sup \mathbb S_{-q, (c_{n_r})}\right) -h\left( \inf {\mathbb {S}}_{-q, (c_{n_r})}\right) \nonumber \\{} & {} =\mu _h \left( \left[ \inf {\mathbb {S}}_{-q, (c_{n_r})}, \sup {\mathbb {S}}_{-q, (c_{n_r})}\right] \right) =\prod ^{r} _{j=1}{\ddot{p}_{c_{n_j}}}. \end{aligned}$$
(6)

Let us note that one can consider the intervals \(\left[ \inf \mathbb S_{-q, (c_{n_r})}, \sup {\mathbb {S}}_{-q, (c_{n_r})}\right] \). Then

$$\begin{aligned} \sup {\mathbb {S}}_{-q, (c_{n_r})}-\inf {\mathbb {S}}_{-q, (c_{n_r})}=1-\sum ^{r} _{j=1}{\frac{q-1}{q^{n_j}}}. \end{aligned}$$

So, one can formulate the following statements.

Theorem 3

The function h has the following properties:

  1. 1.

    If \(p_j\ge 0\) or \(p_j>0\) for all \(j=\overline{0,q-1}\), then:

    • h does not have intervals of monotonicity on \(\left[ -\frac{q}{q+1}, \frac{1}{q+1}\right] \) whenever the condition \(n_k=k\) holds for no more than a finite number of values of k;

    • h has at least one interval of monotonicity whenever the condition \(n_k\ne k\) holds for a finite number of values of k;

    • h is a monotonic non-decreasing function (in the case when \(p_j\ge 0\) for all \(j=\overline{0,q-1}\)) or is a strictly increasing function (in the case when \(p_j> 0\) for all \(j=\overline{0,q-1}\)) whenever the condition \(n_k=k\) holds for \(k\in {\mathbb {N}}\).

  2. 2.

    If there exists \(p_j=0\), where \(j=\overline{0,q-1}\), then h is constant almost everywhere on the domain.

  3. 3.

    If there exists \(p_j<0\) (other \(p_j\) are positive), where \(j=\overline{0,q-1}\), and the condition \(n_k=k\) holds for almost all \(k\in {\mathbb {N}}\), then h does not have intervals of monotonicity.

Let us note that the last statements follow from (6).

Lemma 1

Let \(\eta \) be a random variable defined by the following form

$$\begin{aligned} \eta =\Delta ^{q} _{\ddot{\xi }_{1}\ddot{\xi }_{2}...\ddot{\xi }_{k}...}, \end{aligned}$$

where

$$\begin{aligned} \ddot{\xi }_k={\left\{ \begin{array}{ll} i_k &{}\quad \text {if}\, k\,\, \text {is even }\\ {q-1-i_k}&{}\quad \text {if}\, k\,\,\text {is odd}, \end{array}\right. } \end{aligned}$$

\(k=1,2,3,\dots \), and the digits \(\xi _{k}\) are random and take the values \(0,1,\dots ,q-1\) with probabilities \({p}_{0}, {p}_{1}, \dots , {p}_{q-1}\). That is, \(\xi _n\) are independent and \(P\{\xi _{k}=i_{n_k}\}=p_{i_{n_k}}\), \(i_{n_k}\in \{0,1,\dots q-1\}\). Here \((n_k)\) is a sequence of positive integers such that \(n_i\ne n_j\) for \(i\ne j\) and such that for any \(n\in {\mathbb {N}}\) there exists a number \(k_0\) for which the condition \(n_{k_0}=n\) holds.

The distribution function \({\ddot{F}}_{\eta }\) of the random variable \(\eta \) can be represented by

$$\begin{aligned} {\ddot{F}}_{\eta }(x)={\left\{ \begin{array}{ll} 0,&{} x< 0\\ \ddot{\beta }_{i_{n_1}(x)}+\sum ^{\infty } _{k=2} {\left( {\ddot{\beta }}_{i_{n_k}(x)} \prod ^{k-1} _{r=1} {\ddot{p}_{i_{n_r}(x)}}\right) },&{} 0 \le x<1\\ 1,&{}{ x\ge 1.} \end{array}\right. } \end{aligned}$$

A method of the corresponding proof is described in [12].

Theorem 4

The Lebesgue integral of the function h can be calculated by the formula

$$\begin{aligned} \int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(x)dx}=\frac{1}{q+1}\sum ^{q-1} _{j=0}{\ddot{\beta }_j}. \end{aligned}$$

Proof

By \({\ddot{A}}\) denote the sum \(\frac{1}{q}\sum ^{q-1} _{j=0}{\ddot{\beta }_j}\) and by \({\ddot{B}}\) denote the sum \(\frac{1}{q}\sum ^{q-1}_{j=0}{\ddot{p}_j}\). Since equality (3) holds, we obtain

$$\begin{aligned} x=-\frac{1}{q}\sigma _m(x)+\frac{q+1}{q}\sum ^{m} _{k=1}{\frac{i_k}{(-q)^k}}+\frac{i_m}{(-q)^{m+1}} \end{aligned}$$

and

$$\begin{aligned} dx=-\frac{1}{q}d(\sigma _m(x)). \end{aligned}$$

In the general case, for arbitrary positive integers \(n_1\) and \(n_2\), using equality (4), we have

$$\begin{aligned} \sigma _{{\bar{n}}_2}\circ \sigma _{{\bar{n}}_1}(x)={\left\{ \begin{array}{ll} \Delta ^{-q} _{i_1i_2...i_{n_2-1}i_{n_2+1}...i_{n_1-1}i_{n_1+1}...}&{}{} \text{ whenever }\ n_1>n_2\\ \Delta ^{-q} _{i_1i_2...i_{n_1-1}i_{n_1+1}...i_{n_2}i_{n_2+2}i_{n_2+3}...}&{}{}\,\,\text{ whenever }\, \,n_1<n_2 \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} d\left( \sigma _{{\bar{n}}_{k-1}}\circ \dots \circ \sigma _{{\bar{n}}_2}\circ \sigma _{{\bar{n}}_1}(x)\right) =-\frac{1}{q}d\left( \sigma _{\bar{n}_k}\circ \sigma _{{\bar{n}}_{k-1}}\circ \dots \circ \sigma _{\bar{n}_2}\circ \sigma _{{\bar{n}}_1}(x)\right) , \end{aligned}$$

where \(k\in {\mathbb {N}}\) and \(\sigma _0(x)=x\).

So, we have

$$\begin{aligned} {}&{} \int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(x)dx}=\sum ^{q-1} _{j=0}{\int ^{\sup {\Lambda ^{-q} _{j}} } _{\inf {\Lambda ^{-q} _{j}}} {h(x)dx}}=\sum ^{q-1} _{j=0}\int ^{\sup {\Lambda ^{-q} _{j}} } _{\inf {\Lambda ^{-q} _{j}}}{{\left( \ddot{\beta }_j+\ddot{p}_jh(\sigma _{{\hat{n}}_1}(x))\right) dx}}\\{}&{} =\frac{1}{q}\sum ^{q-1} _{j=0}{\ddot{\beta }_j}-\frac{1}{q}\left( \sum ^{q-1} _{j=0}{\ddot{p}_j}\right) \int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(\sigma _{\hat{n}_1}(x))d(\sigma _{{\hat{n}}_1}(x))}\\{}&{} =\frac{1}{q}\sum ^{q-1} _{j=0}{\ddot{\beta }_j}-\frac{1}{q}\left( \sum ^{q-1} _{j=0}{\ddot{p}_j}\right) \left( \sum ^{q-1} _{j=0}{\int ^{\sup {\Lambda ^{-q} _{j}} } _{\inf {\Lambda ^{-q} _{j}}} {\left( \ddot{\beta }_j+\ddot{p}_jh(\sigma _{{\hat{n}}_2}\circ \sigma _{\hat{n}_1}(x))\right) d(\sigma _{{\hat{n}}_1}(x))}}\right) \\{}&{} ={\ddot{A}}-{\ddot{B}}\left( {\ddot{A}}-{\ddot{B}}\int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(\sigma _{{\hat{n}}_2}\circ \sigma _{\hat{n}_1}(x)))d(\sigma _{{\hat{n}}_2}\circ \sigma _{{\hat{n}}_1}(x))}\right) \\{}&{} ={\ddot{A}}-{\ddot{A}}{\ddot{B}}+{\ddot{B}}^2\left( \sum ^{q-1} _{j=0}{\int ^{\sup {\Lambda ^{-q} _{j}} } _{\inf {\Lambda ^{-q} _{j}}} {\left( \ddot{\beta }_j+\ddot{p}_jh(\sigma _{{\hat{n}}_3}\circ \sigma _{\hat{n}_2}\circ \sigma _{{\hat{n}}_1}(x))\right) d(\sigma _{\hat{n}_2}\circ \sigma _{{\hat{n}}_1}(x))}}\right) \\{}&{} ={\ddot{A}}-{\ddot{A}}{\ddot{B}}+{\ddot{B}}^2\left( {\ddot{A}}-\ddot{B}\int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(\sigma _{\hat{n}_3}\circ \sigma _{{\hat{n}}_2}\circ \sigma _{{\hat{n}}_1}(x)))d(\sigma _{\hat{n}_3}\circ \sigma _{{\hat{n}}_2}\circ \sigma _{{\hat{n}}_1}(x))}\right) \\{}&{} =\ddot{A}-{\ddot{A}}{\ddot{B}}+{\ddot{A}}{\ddot{B}}^2\\{}&{} \quad -{\ddot{B}}^3\left( {\ddot{A}}-{\ddot{B}}\int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(\sigma _{{\hat{n}}_4}\circ \sigma _{\hat{n}_3}\circ \sigma _{{\hat{n}}_2}\circ \sigma _{{\hat{n}}_1}(x)))d(\sigma _{\hat{n}_4}\circ \sigma _{{\hat{n}}_3}\circ \sigma _{{\hat{n}}_2}\circ \sigma _{\hat{n}_1}(x))}\right) =\dots \\{}&{} \quad \dots = {\ddot{A}}-{\ddot{A}}{\ddot{B}}+\dots + A{\ddot{B}}^{2t-2}-{\ddot{A}}\ddot{B}^{2t-1}\\{}&{} \quad +{\ddot{B}}^k\left( {\ddot{A}}-{\ddot{B}}\int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(\sigma _{{\hat{n}}_{k+1}}\circ \sigma _{\hat{n}_k}\circ \ldots \circ \sigma _{{\hat{n}}_1}(x)))d(\sigma _{\hat{n}_{k+1}}\circ \sigma _{{\hat{n}}_k}\circ \ldots \circ \sigma _{\hat{n}_1}(x))}\right) . \end{aligned}$$

Since

$$\begin{aligned} \sum ^{q-1} _{j=0}{\ddot{p}_j}=1, ~~~\ddot{B}^{k+1}=\left( \frac{1}{q}\sum ^{q-1} _{j=0}{\ddot{p}_j}\right) ^{k+1}=\left( \frac{1}{q}\right) ^{k+1} \rightarrow 0 ~\text {as}~ k\rightarrow \infty , \end{aligned}$$

we obtain

$$\begin{aligned}{} & {} {} \int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} {h(x)dx}\\{}{} & {} {} \quad =\lim _{k\rightarrow \infty }\left( \sum ^{k} _{t=0}{{\ddot{A}} (-{\ddot{B}})^t}-\ddot{B}^{k+1}\int ^{\frac{1}{q+1}} _{-\frac{q}{q+1}} h(\sigma _{\hat{n}_{k+1}}\circ \sigma _{{\hat{n}}_k}\circ \ldots \circ \sigma _{\hat{n}_1}(x)))\right. \\{}{} & {} {} \qquad \ \times \left. d(\sigma _{{\hat{n}}_{k+1}}\circ \sigma _{{\hat{n}}_k}\circ \ldots \circ \sigma _{{\hat{n}}_1}(x))\right) \\{}{} & {} {} \quad =\sum ^{\infty } _{k=0}{{\ddot{A}}(-{\ddot{B}})^k}=\left( \frac{\sum ^{q-1} _{j=0}{\ddot{\beta }_j}}{q}\right) \left( \sum ^{\infty } _{k=0}{\frac{1}{(-q)^{k}}}\right) =\frac{1}{q+1}\sum ^{q-1} _{j=0}{\ddot{\beta }_j}. \end{aligned}$$

\(\square \)

Since now researchers are trying to find simpler examples of singular functions, differential properties will be investigated in the next papers of the author of this article.