1 Introduction

Let p be a fixed odd prime number. Throughout this paper, \(\mathbb{Z}_{p}\), \(\mathbb{Q}_{p}\), and \(\mathbb{C}_{p}\) will denote the ring of p-adic integers, the field of p-adic rational numbers, and the completion of the algebraic closure of \(\mathbb{Q}_{p}\), respectively. Let \(|\cdot |_{p}\) be the p-adic norm which is normalized as \(|p|_{p}=\frac{1}{p}\). Let q be an indeterminate such that \(q \in {\mathbb{C}}_{p}\) with \(|1-q|_{p} < p^{-\frac{1}{p-1}}\), and \([x]_{q} = \frac{1-q^{x}}{1-q}\). Note that \([x]_{-q} = \frac{1-(-q)^{x}}{1+q}\).

The bosonic p-adic q-integrals on \(\mathbb{Z}_{p}\) are defined by Kim as

$$ \int _{\mathbb{Z}_{p}} f(x)\,d\mu _{q}(x)= \lim _{N\rightarrow \infty } \frac{1}{[p ^{N}]_{q}} \sum_{x=0}^{p^{N}-1} f(x) q^{x} \quad (\text{see [7]}), $$
(1.1)

where f is a uniformly differentiable function on \(\mathbb{Z}_{p}\).

In [1, 2], Carlitz considered the q-Bernoulli numbers which are given by the recurrence relation:

$$ \begin{aligned} \beta _{0,q}=1, \quad q(q\beta _{q}+1)^{n}-\beta _{n,q} = \textstyle\begin{cases} 1, & \text{if } n=1, \\ 0, & \text{if } n>1, \end{cases}\displaystyle \end{aligned} $$
(1.2)

with the usual convention about replacing \(\beta _{q}^{n}\) by \(\beta _{n,q}\).

In [6, 7], Kim gave the following Witt type formula:

$$ \int _{\mathbb{Z}_{p}} [x]_{q}^{n} \,d\mu _{q}(x) = \beta _{n,q} \quad (n \geq 0). $$
(1.3)

Carlitz also defined the q-Bernoulli polynomials by

$$ \beta _{n,q}(x) = \bigl(q^{x} \beta _{q} + [x]_{q}\bigr)^{n} = \sum _{l=0}^{n} \binom{n}{l}[x]_{q}^{n-l} q^{lx} \beta _{l,q} \quad (\text{see [1, 2]}), $$
(1.4)

where n is a nonnegative integer.

An integral representation for \(\beta _{n,q}(x)\), \((n \geq 0)\) was given by Kim as follows:

$$ \int _{\mathbb{Z}_{p}} [x+y]_{q}^{n} \,d\mu _{q}(y) = \beta _{n,q}(x), \quad (n \geq 0), \ (\text{see [5, 7]}). $$
(1.5)

In [6, 8, 10], Kim introduced the modified q-Bernoulli polynomials as the p-adic q-integral on \(\mathbb{Z}_{p}\) given by

$$ B_{n,q}(x) = \int _{\mathbb{Z}_{p}} q^{-y} [x+y]_{q}^{n} \,d \mu _{q}(y) \quad (n \geq 0). $$
(1.6)

For \(x=0\), \(B_{n,q} = B_{n,q}(0)\) are called the modified q-Bernoulli numbers.

From (1.1), we note that

$$ \begin{aligned} B_{0,q}=\frac{q-1}{\log q}, \quad (q B_{q}+1)^{n} - B_{n,q} = \textstyle\begin{cases} 1, & \text{if } n=1, \\ 0, & \text{if } n>1, \end{cases}\displaystyle \end{aligned} $$
(1.7)

with the usual convention about replacing \(B_{q}^{n}\) by \(B_{n,q}\).

By (1.6), we easily get

$$ \begin{aligned} B_{n,q}(x) & = \sum _{l=0}^{n} \binom{n}{l}[x]_{q}^{n-l} q^{lx} B_{l,q} \quad (n \geq 0), \\ & = \frac{1}{(1-q)^{n}} \sum_{l=0}^{n} \binom{n}{l} (-1)^{l} q^{lx} \frac{l}{[l]_{q}} \quad (n \geq 0) \ (\text{see [6, 8, 10]}). \end{aligned} $$

It is well known that

$$ 0^{k} + 1^{k} + 2^{k} + \cdots +(n-1)^{k} = \frac{1}{k+1} \bigl(B_{k+1}(n) - B_{k+1} \bigr) \quad (n \geq 1, k \geq 0). $$
(1.8)

Here \(B_{k}(x)\) are the Bernoulli polynomials given by

$$ \frac{t}{e^{t}-1} e^{xt} = \sum _{n=0}^{\infty }B_{n}(x) \frac{t^{n}}{n!} \quad (\text{see [1--17]}), $$
(1.9)

and \(B_{n} = B_{n}(0)\) are called the Bernoulli numbers.

In [8], Kim proved that the power sums of consecutive nonnegative q-integers are given by

$$ [0]_{q}^{k} + q [1]_{q}^{k} + q^{2} [2]_{q}^{k} + \cdots + q^{n-1} [n-1]_{q} ^{k} = \frac{1}{k+1} \bigl(B_{k+1,q}(n) - B_{k+1,q} \bigr) \quad (n \geq 1, k \geq 0). $$

Now, we consider the power sums of consecutive odd positive q-integers and ask the following question:

$$ q [1]_{q}^{k} + q^{3} [3]_{q}^{k} + q^{5} [5]_{q}^{k} +\cdots + q^{2n-1} [2n-1]_{q}^{k} = ? $$
(1.10)

In addition, we ask the following question:

$$ [1]_{q}^{k} -q [3]_{q}^{k} +q^{2} [5]_{q}^{k} -\cdots + (-1)^{n-1} q ^{n-1} [2n-1]_{q}^{k} = ? $$
(1.11)

We will see that (1.10) can be expressed in terms of type 2 q-Bernoulli polynomials and (1.11) by virtue of type 2 q-Euler polynomials. Here we note that the type 2 q-Bernoulli polynomials are represented by bosonic p-adic q-integrals on \(\mathbb{Z}_{p}\) and the type 2 q-Euler polynomials by fermionic p-adic q-integrals on \(\mathbb{Z}_{p}\).

2 Type 2 q-Bernoulli polynomials and numbers

From (1.1), we have

$$ \int _{\mathbb{Z}_{p}} q^{-x} f(x+1) \,d\mu _{q}(x) = \int _{\mathbb{Z} _{p}} q^{-x}f(x) \,d\mu _{q}(x) + \frac{q-1}{\log q} f'(0). $$
(2.1)

By using (2.1) and induction, we get

$$ \int _{\mathbb{Z}_{p}} q^{-x} f(x+n) \,d\mu _{q}(x) = \int _{\mathbb{Z} _{p}} q^{-x}f(x) \,d\mu _{q}(x) + \frac{q-1}{\log q} \sum_{l=0}^{n-1} f'(l), $$
(2.2)

where n is a positive integer.

In view of (1.6), we consider the generating function of the type 2 q-Bernoulli polynomials given by the following p-adic q-integral on \(\mathbb{Z}_{p}\):

$$ \int _{\mathbb{Z}_{p}} q^{-y} e^{[2y+x+1]_{q} t} \,d\mu _{q}(y) = \sum_{n=0}^{\infty }b_{n,q}(x) \frac{t^{n}}{n!}. $$
(2.3)

From (2.3), we have

$$ \int _{\mathbb{Z}_{p}} q^{-y} [2y+x+1]_{q}^{n} \,d\mu _{q}(y) = b_{n,q}(x) \quad (n \geq 0). $$
(2.4)

For \(x=0\), \(b_{n,q} = b_{n,q}(0)\) are called the type 2 q-Bernoulli numbers.

By (2.4), we get

$$ b_{n,q}= \int _{\mathbb{Z}_{p}} q^{-y} [2y+1]_{q}^{n} \,d\mu _{q}(y)= \frac{2}{(1-q)^{n}} \sum_{l=0}^{n} \binom{n}{l} (-1)^{l} q^{l} \frac{l}{[2l]_{q}}. $$
(2.5)

By (2.5), we easily get

$$ \begin{aligned}[b] b_{n,q} & = \frac{2}{(1-q)^{n}} \sum_{l=0}^{n} \binom{n}{l} (-1)^{l} q ^{l} \frac{l}{[2l]_{q}} \\ & = \frac{2n}{(1-q)^{n}} \sum_{l=1}^{n} \binom{n-1}{l-1} (-1)^{l} q ^{l} (1-q) \sum _{m=0}^{\infty }q^{2lm} \\ & = \frac{-2n}{(1-q)^{n-1}} \sum_{m=0}^{\infty }q^{2m+1} \sum_{l=0} ^{n-1} \binom{n-1}{l} (-1)^{l} q^{(2m+1)l} \\ & = -2n \sum_{m=0}^{\infty }q^{2m+1} [2m+1]_{q}^{n-1}. \end{aligned} $$
(2.6)

Theorem 2.1

For \(n \geq 0\), we have

$$ \begin{aligned}[b] b_{n,q} & = \frac{2}{(1-q)^{n}} \sum_{l=0}^{n} \binom{n}{l} (-1)^{l} q ^{l} \frac{l}{[2l]_{q}} \\ & = -2n \sum_{m=0}^{\infty }q^{2m+1} [2m+1]_{q}^{n-1}. \end{aligned} $$
(2.7)

By (2.7), we can derive the generating function for the type 2 q-Bernoulli numbers as follows:

$$ \sum_{n=0}^{\infty }b_{n,q} \frac{t^{n}}{n!} = -2t \sum_{m=0}^{\infty }q^{2m+1} e^{[2m+1]_{q} t}. $$
(2.8)

From (2.4), we note that

$$ b_{n,q}(x) = \sum_{l=0}^{n} \binom{n}{l} q^{lx} b_{l,q} [x]_{q}^{n-l}, $$
(2.9)

and that

$$ \bigl(q^{2} b_{q} +1 +q \bigr)^{n} - b_{n,q} = 2nq \quad (n \geq 0). $$
(2.10)

From (2.4), we easily get

$$ \begin{aligned}[b] b_{n,q}(x) & = \frac{2}{(1-q)^{n}} \sum_{l=0}^{n} \binom{n}{l} (-1)^{l} q^{(x+1)l} \frac{l}{[2l]_{q}} \\ & = -2n \sum_{m=0}^{\infty }q^{2m+1+x} [2m+1+x]_{q}^{n-1} \quad (n \geq 0). \end{aligned} $$
(2.11)

From (2.2), we note that

$$ \begin{aligned}[b] b_{m,q}(2n) - b_{m,q} & = \int _{\mathbb{Z}_{p}} q^{-x} [2x+1+2n]_{q} ^{m} \,d\mu _{q}(x) - \int _{\mathbb{Z}_{p}} q^{-x} [2x+1]_{q}^{m} \,d\mu _{q}(x) \\ & = 2m \sum_{l=0}^{n-1} q^{2l+1} [2l+1]_{q}^{m-1}. \end{aligned} $$
(2.12)

Therefore, by (2.12), we obtain the following theorem.

Theorem 2.2

For \(m \geq 0\) and \(n \in \mathbb{N}\), we have

$$ \frac{1}{m+1} \bigl(b_{m+1,q}(2n) - b_{m+1,q} \bigr) = 2 \sum_{l=0} ^{n-1} q^{2l+1} [2l+1]_{q}^{m}. $$
(2.13)

From (2.13), we note that

$$ \begin{aligned}[b] \sum_{l=0}^{n-1} q^{2l+1} [2l+1]_{q}^{m} = {}& \frac{1}{2m+2} \Biggl( \sum_{l=0}^{m+1} \binom{m+1}{l} q^{2nl} b_{l,q} [2n]_{q}^{m+1-l} - b _{m+1,q} \Biggr) \\ ={}& \frac{1}{2m+2} \Biggl(\sum_{l=0}^{m} \binom{m+1}{l} q^{2nl} b_{l,q} [2n]_{q}^{m+1-l} \\ & {}+ (q-1) \bigl[2n(m+1)\bigr]_{q} b_{m+1,q} \Biggr). \end{aligned} $$
(2.14)

By (2.14), we get the following corollary.

Corollary 2.3

For \(n \in \mathbb{N}\) and \(m \geq 0\), we have

$$ \begin{aligned}[b] \sum_{l=0}^{n-1} q^{2l+1} [2l+1]_{q}^{m} ={}& \frac{1}{2m+2} \sum _{l=0} ^{m} \binom{m+1}{l} q^{2nl} [2n]_{q}^{m+1-l} b_{l,q} \\ & {} + \frac{(q-1) [2n(m+1)]_{q} b_{m+1,q}}{2m+2}. \end{aligned} $$
(2.15)

Example

Here we check formula (2.15) for \(m=1\). First, we observe that

$$ \begin{aligned}[b] [2n+1] _{q}^{2} - 1 & = \sum_{l=0}^{n-1} \bigl([2l+3]_{q}^{2} - [2l+1]_{q} ^{2} \bigr) \\ &= \sum_{l=0}^{n-1} \bigl([2l+1]_{q} +q^{2l+1}[2]_{q} - [2l+1]_{q} \bigr) \\ & \quad \times \bigl([2l+1]_{q} +q^{2l+1}[2]_{q} + [2l+1]_{q} \bigr) \\ & = 2[2]_{q} \sum_{l=0}^{n-1} q^{2l+1} [2l+1]_{q} + \frac{[2]_{q} ^{2} q^{2} [4n]_{q} }{[4]_{q}}. \end{aligned} $$
(2.16)

By (2.16), we get

$$ \begin{aligned}[b] \sum_{l=0}^{n-1} q^{2l+1} [2l+1]_{q} &= \frac{1}{2[2]_{q}} \biggl([2n+1]_{q} ^{2} - 1 - [2]_{q}^{2}q^{2} \frac{[4n]_{q}}{[4]_{q}} \biggr) \\ &=\frac{1}{2(q+1)} \biggl\{ \biggl(\frac{1-q^{2n+1}}{1-q} \biggr)^{2}-1-q ^{2}(q+1)^{2}\frac{1-q^{4n}}{1-q^{4}} \biggr\} \\ &=\frac{q(1-q^{2n})}{(1-q)(1-q^{2})}-\frac{q^{2}(1-q^{4n})}{(1-q)(1-q ^{4})}. \end{aligned} $$
(2.17)

We now show that (2.17) agrees with the result in (2.15). For this, we first note the following from (2.7):

$$ \begin{aligned} &b_{0,q}=\frac{q-1}{\log q}, \qquad b_{1,q}=-\frac{1}{\log q}-\frac{2q}{1-q^{2}}, \\ & b_{2,q}=\frac{2}{1-q} \biggl(-\frac{1}{2 \log q}- \frac{2q}{1-q^{2}}+\frac{2q ^{2}}{1-q^{4}} \biggr). \end{aligned} $$

Then, from (2.15), we have

$$ \begin{aligned}\sum_{l=0}^{n-1} q^{2l+1} [2l+1]_{q}={}& \frac{1}{4} \bigl([2n]_{q}^{2}b _{0,q} +2q^{2n}[2n]_{q}b_{1,q} +(q-1)[4n]_{q}b_{2,q} \bigr) \\ ={}&\frac{1}{4} \biggl\{ \biggl(\frac{1-q^{2n}}{1-q} \biggr)^{2} \frac{q-1}{ \log q}+2q^{2n}\frac{1-q^{2n}}{1-q} \biggl(-\frac{1}{\log q}- \frac{2q}{1-q ^{2}} \biggr) \\ & {}+(q-1)\frac{1-q^{4n}}{1-q} \frac{2}{1-q} \biggl(-\frac{1}{2 \log q}-\frac{2q}{1-q^{2}}+ \frac{2q^{2}}{1-q^{4}} \biggr) \biggr\} \\ ={}&\frac{q(1-q^{2n})}{(1-q)(1-q^{2})}-\frac{q^{2}(1-q^{4n})}{(1-q)(1-q^{4})}. \end{aligned} $$

3 Type 2 q-Euler polynomials and numbers

It is known that the fermionic p-adic q-integrals on \(\mathbb{Z} _{p}\) are defined by Kim as

$$ I_{-q} (f) = \int _{\mathbb{Z}_{p}} f(x) \,d\mu _{-q}(x)= \lim _{N\rightarrow \infty } \frac{1}{[p^{N}]_{-q}} \sum_{x=0}^{p^{N}-1} f(x) (-q)^{x} \quad (\text{see [11, 14, 17]}), $$
(3.1)

where \([x]_{-q} = \frac{1-(-q)^{x}}{1+q}\).

From (3.1), we note that

$$ \begin{aligned}[b] q I_{-q} (f_{1}) & = q \int _{\mathbb{Z}_{p}} f(x+1) \,d\mu _{-q}(x)= \lim _{N\rightarrow \infty } \frac{q}{[p^{N}]_{-q}} \sum_{x=0}^{p^{N}-1} f(x+1) (-q)^{x} \\ & = -\lim_{N\rightarrow \infty } \frac{1}{[p^{N}]_{-q}} \sum _{x=1} ^{p^{N}} f(x) (-q)^{x} = - I_{-q}(f) + [2]_{q} f(0). \end{aligned} $$
(3.2)

By (3.2), we get

$$ q I_{-q} (f_{1}) = - I_{-q}(f) + [2]_{q} f(0) $$
(3.3)

and

$$ q^{n} I_{-q} (f_{n}) = (-1)^{n} I_{-q}(f) + [2]_{q} \sum _{l=0}^{n-1} (-1)^{n-1-l} q^{l} f(l), $$
(3.4)

where \(f_{n}(x) = f(x+n)\), with \(n \in \mathbb{N}\).

As is known, Carlitz considered q-Euler numbers given by the recurrence relation

$$ \begin{aligned} E_{0,q}=1, \quad q(q E_{q}+1)^{n} + E_{n,q} = \textstyle\begin{cases} [2]_{q}, & \text{if } n=0, \\ 0, & \text{if } n>0, \end{cases}\displaystyle \end{aligned} $$
(3.5)

with the usual convention about replacing \(E_{q}^{l}\) by \(E_{l,q}\) (see [1, 2]).

In [11], Kim obtained the Witt type formula for Carlitz’s q-Euler numbers which is represented by the fermionic p-adic q-integrals on \(\mathbb{Z}_{p}\)

$$ \int _{\mathbb{Z}_{p}} [x]_{q}^{n} \,d\mu _{-q}(x) = E_{n,q} \quad (n \geq 0). $$
(3.6)

From (3.6), we note that

$$ E_{n,q} = \frac{[2]_{q}}{(1-q)^{n}} \sum_{l=0}^{n} \binom{n}{l} (-1)^{l} \frac{1}{1+q^{l+1}} = [2]_{q} \sum_{m=0}^{\infty }(-1)^{m} q^{m} [m]_{q}^{n}. $$
(3.7)

By (3.7), we readily see that the generating function for Carlitz’s q-Euler numbers is given by

$$ F_{q}(t) = \sum_{n=0}^{\infty } E_{n,q} \frac{t^{n}}{n!} = [2]_{q} \sum _{m=0}^{\infty }(-1)^{m} q^{m} e^{[m]_{q} t}. $$
(3.8)

It is known that

$$ q^{n} E_{m,q}(n) + E_{m,q} = [2]_{q} \sum_{l=0} ^{n-1} (-1)^{l} q^{l} [l]_{q}^{m} \quad (\text{see [1, 2]}), $$
(3.9)

where \(n \in \mathbb{N}\) with \(n \equiv 1(\mathrm{mod}~2)\). Note that equation (3.9) is an alternating sum of powers of consecutive positive q-integers.

Now, we consider an alternating sum of powers of consecutive positive odd q-integers which are given by

$$ \sum_{l=0}^{n-1} (-1)^{l} q^{l} [2l+1]_{q}^{m} = [1]_{q}^{m} - q[3]_{q} ^{m} + q^{2} [5]_{q}^{m} - \cdots + (-1)^{n-1} q^{n-1} [2n-1]_{q}^{m}. $$
(3.10)

Let us define the type 2 q-Euler polynomials which are given by

$$ \int _{\mathbb{Z}_{p}} [2y+x+1]_{q}^{m} \,d\mu _{-q}(y) = \mathcal{E}_{m,q}(x) \quad (m \geq 0). $$
(3.11)

When \(x=0\), \(\mathcal{E}_{n,q} = \mathcal{E}_{n,q}(0)\), \((n \geq 0)\) are called the type 2 q-Euler numbers.

From (3.11), we note that

$$ \begin{aligned}[b] \mathcal{E}_{m,q} (x) & = \frac{[2]_{q}}{(1-q)^{m}} \sum_{l=0}^{m} \binom{m}{l} (-1)^{l} q^{l(1+x)} \frac{1}{1+q^{2l+1}} \\ & = [2]_{q} \sum_{k=0}^{\infty }(-1)^{k} q^{k} [2k+1+x]_{q}^{m} \quad (m \geq 0). \end{aligned} $$
(3.12)

By (3.12), we get the following generating function for the q-Euler polynomials:

$$ \sum_{m=0}^{\infty } \mathcal{E}_{m,q}(x) \frac{t^{m}}{m!} = [2]_{q} \sum _{k=0}^{\infty }(-1)^{k} q^{k} e^{[2k+1+x]_{q} t}. $$
(3.13)

Theorem 3.1

For \(m \geq 0\), we have

$$ \begin{aligned}[b] \mathcal{E}_{m,q}(x) & = \frac{[2]_{q}}{(1-q)^{m}} \sum_{l=0}^{m} \binom{m}{l} (-1)^{l} q^{l(1+x)} \frac{1}{1+q^{2l+1}} \\ & = [2]_{q} \sum_{k=0}^{\infty }(-1)^{k} q^{k} [2k+1+x]_{q}^{m}. \end{aligned} $$
(3.14)

From (3.11), we have

$$ \begin{aligned}[b] \mathcal{E}_{n,q}(x) & = \int _{\mathbb{Z}_{p}} [2y+1+x]_{q}^{n} \,d\mu _{-q}(y) \\ & = \sum_{l=0}^{n} \binom{n}{l} [x]_{q}^{n-l} q^{lx} \int _{\mathbb{Z}_{p}} [2y+1]_{q}^{l} \,d\mu _{-q}(y) \\ & = \sum_{l=0}^{n} \binom{n}{l} [x]_{q}^{n-l} q^{lx} \mathcal{E}_{l,q} \quad (n \geq 0). \end{aligned} $$
(3.15)

Also, by (3.3), we get

$$ q \mathcal{E}_{m,q}(2) + \mathcal{E}_{m,q} = [2]_{q} \quad (n \geq 0). $$
(3.16)

Therefore, by (3.15) and (3.16), we obtain the following theorem.

Theorem 3.2

For \(m \geq 0\), we have

$$ \mathcal{E}_{m,q}(x) = \sum _{l=0}^{m} \binom{m}{l} [x]_{q}^{m-l} q ^{lx} \mathcal{E}_{l,q}. $$
(3.17)

In particular,

$$ q \mathcal{E}_{m,q}(2)= [2]_{q} - \mathcal{E}_{m,q} \quad (m \geq 0). $$
(3.18)

Let n be a positive integer with \(n \equiv 1(\mathrm{mod}~2)\). From (3.4), we have

$$ \begin{aligned}[b] & q^{n} \int _{\mathbb{Z}_{p}} [2y+2n+1]_{q}^{m} \,d\mu _{-q}(y) + \int _{\mathbb{Z}_{p}} [2y+1]_{q}^{m} \,d\mu _{-q}(y) \\ &\quad = [2]_{q} \sum_{l=0}^{n-1} (-1)^{l} q^{l} [2l+1]_{q}^{m}. \end{aligned} $$
(3.19)

By (3.11) and (3.19), we get

$$ q^{n} \mathcal{E}_{m,q}(2n) + \mathcal{E}_{m,q} = [2]_{q} \sum_{l=0} ^{n-1} (-1)^{l} q^{l} [2l+1]_{q}^{m}. $$
(3.20)

Therefore, by (3.20), we obtain the following theorem.

Theorem 3.3

For \(n \in \mathbb{N}\) with \(n \equiv 1(\mathrm{mod}~2)\) and \(m \geq 0\), we have

$$ q^{n} \mathcal{E}_{m,q}(2n) + \mathcal{E}_{m,q} = [2]_{q} \sum_{l=0} ^{n-1} (-1)^{l} q^{l} [2l+1]_{q}^{m}. $$
(3.21)

4 Conclusions

In an introductory calculus class, the following formulas are proved by mathematical induction and used in Riemann sum evaluations of some definite integrals:

$$ \begin{aligned} &\sum_{k=0}^{n} k = 1 + 2 + \cdots + n = \frac{n(n+1)}{2} = \binom{n+1}{2}, \\ &\sum_{k=0}^{n} k^{2} = 1^{2} + 2^{2} + \cdots + n^{2} = \frac{n(n+1)(2n+1)}{6}, \\ &\sum_{k=0}^{n} k^{3} = 1^{3} + 2^{3} + \cdots + n^{3} = \binom{n+1}{2}^{2} = \biggl(\frac{n(n+1)}{2} \biggr)^{2}. \end{aligned} $$

The problem of finding formulas for power sums of consecutive nonnegative integers has captivated mathematicians for many centuries. Even since generalized formulas for the power sums, \(S_{k} (n) = \sum_{l=0}^{n} l^{k}\), were established, the various representations and number-theoretic properties have been studied by Faulhaber. In this paper, we studied the q-analogues of Faulhaber’s well-known formula expressing the power sums in terms of Bernoulli polynomials. Indeed, we showed that power sums of consecutive positive odd q-integers can be expressed by means of type 2 q-Bernoulli polynomials. Also, we showed that alternating power sums of consecutive positive odd q-integers can be represented by virtue of type 2 q-Euler polynomials. The type 2 q-Bernoulli polynomials and type 2 q-Euler polynomials were introduced respectively as the bosonic p-adic q-integrals on \(\mathbb{Z}_{p}\) and the fermionic p-adic q-integrals on \(\mathbb{Z}_{p}\). Along the way, we also obtained Witt type formulas and explicit expressions for those two newly introduced polynomials.