  In this paper, we give convenient formulas in order to obtain explicit
expressions of a generalized Frobenius number called the $p$-Frobenius number
as well as its related values. Here, for a non-negative integer $p$, the
$p$-Frobenius number is the largest integer whose number of solutions of the
linear diophantine equation in terms of positive integers $a_1,a_2,\dots,a_k$
with $\gcd(a_1,a_2,\dots,a_k)=1$ is at most $p$. When $p=0$, the problem is
reduced to the famous and classical linear Diophantine problem of Frobenius.
$0$-Frobenius number is the classical Frobenius number. Our formula is not only
a natural extension of the existing classical formulas, but also has the great
advantage that the explicit expressions of values such as the $p$-Frobenius and
related numbers can be obtained systematically. The concept and formula of the
weighted sum has been given recently. We also give a $p$-generalized formula
for such weighted sums. The central role is the $p$-Ap\'ery set, which is a
generalization of the classical Ap\'ery set.
