Let's assume that $g(x)$ is given and we try to find out $f(n)$
$$
f(n)=\sum_{i=1}^n g(i)
$$
$$
f(n+1)=\sum_{i=1}^{n+1}g(i)
$$
$$
f(n+1)-f(n)=g(n+1)
\tag 1$$
We know Taylor expansion
$$
f(x+h)=f(x)+hf'(x)+\frac{h^2 f''(x)}{2!}+\frac{h^3f'''(x)}{3!}+....
$$
Thus
$$
f(n+1)=f(n)+f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+....
$$
If we put $f(n+1)$ taylor expansion in Equation $1$
$$f(n+1)-f(n)=g(n+1)$$
$$
f(n)+f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+....-f(n)=g(n+1)
$$
$$
f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+...=g(n+1)
\tag 2$$
$$
f(n)+\frac{f'(n)}{2!}+\frac{f''(n)}{3!}+\frac{f'''(n)}{4!}+...=\int g(n+1) dn
$$
We need $f(n)$ if so we need to cancel $f'(n)$ . So we need to
$$
-\frac{1}{2} ( f'(n)+\frac{f''(n)}{2!}+\frac{f'''(n)}{3!}+...)=-\frac{1}{2}g(n+1)
$$
$$
f(n)+ (-\frac{1}{2.2} +\frac{1}{3!})f''(n)+(-\frac{1}{2.3!} +\frac{1}{4!})f'''(n)+...=\int g(n+1) dn-\frac{1}{2}g(n+1)
$$
$$
f''(n)+\frac{f'''(n)}{2!}+\frac{f^{4}(n)}{3!}+...=\frac{d(g(n+1))}{dn}
$$
If you continue in that way to cancel $f^{r}(n)$ terms step by step, you will get
$$
f(n)=\int g(n+1) dn-\frac{1}{2}g(n+1)+\frac{1}{12}\frac{d(g(n+1))}{dn}+a_4\frac{d^2(g(n+1))}{dn^2}+a_5\frac{d^3(g(n+1))}{dn^3}+...
$$
This is Euler-Maclaurin formula. (Please see also the Applications of the Bernoulli numbers). I just wanted to show Bernoulli numbers seen in one of the very important formulas in mathematics .
Where $$a_n= \frac{B_n}{n!}$$.
Because If you try to find out the coefficients of $\frac{t}{e^t-1}$ by polynomial division. You can get exactly same coefficients that seen in Euler-Maclaurin formula.
The Bernoulli numbers appear in Jacob Bernoulli's most original work "Ars Conjectandi" published in Basel in 1713 in a discussion of the exponential series.
You can also see that The Bernoulli numbers appears in the power series of $tan(x)$.
https://en.wikipedia.org/wiki/Taylor_series
(Check the List of Maclaurin series of some common functions)
Proof:
$$\frac{t}{e^t-1}=\frac{t}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1+\frac{(1-1)t-\frac{t^2}{2!}-\frac{t^3}{3!}-\frac{t^4}{4!}-...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1-\frac{+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}$$
$$\frac{t}{e^t-1}=1-\frac{t}{2}+\frac{+(\frac{1}{2}-\frac{1}{2!})t^2+(\frac{1}{2.2!}-\frac{1}{3!})t^3+(\frac{1}{2.3!}-\frac{1}{4!})t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1-\frac{t}{2}+\frac{(\frac{1}{2.2!}-\frac{1}{3!})t^3+(\frac{1}{2.3!}-\frac{t^4}{4!})t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}$$
$$\frac{t}{e^t-1}=1-\frac{1}{2}t+\frac{\frac{1}{12}t^3+\frac{1}{24}t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}=1-\frac{1}{2}t+\frac{1}{12}t^2+\frac{(\frac{1}{24}-\frac{1}{2.12})t^4+...}{t+\frac{t^2}{2!}+\frac{t^3}{3!}+\frac{t^4}{4!}+...}$$
The notation $a|b\;$means $b$ is a multiple of $a$, or equivalently, $a$ is a divisor of $b$.
It's read as "$a$ divides $b$".
Thus, the product in question is the product of all primes $p$ such that $p-1$ divides $n$.
For example,
\begin{align*}
\prod_{p-1|12} p&=(2)(3)(5)(7)(13)=2730\\[4pt]
\prod_{p-1|20} p&=(2)(3)(5)(11)=330\\[4pt]
\end{align*}
For the example you mentioned, $n=50$, the divisors of $50$ are, as you noted, $1,2,5,10,25,50$, but of those, only $1,2,10$ are the form $p-1$ for some prime $p$ (since those are the only ones from that list which are one less than a prime), hence
$$\prod_{p-1|50} p=(2)(3)(11)=66$$
As regards the capital "Pi" notation, it's the product, starting with a default initial value of $1$, of the values of the expression to the right of the product symbol, where the expression is evaluated and used as a factor for each case of the specified iteration condition (i.e., you get a factor for each case where the iteration condition is satisfied).
For the product in question, for a given value of $n$, the specified condition is the requirement that $p-1$ divides $n$, together with the assumption that in this context, $p$ is also required to be prime. For each $p$ satisfying the condition, you get a factor of $p$ (since the expression to the right of the product symbol is $p$).
Best Answer
The simplest way to calculate them, using very few fancy tools, is the following recursive definition:
$$B_n=1-\sum_{k=0}^{n-1}{n\choose k}\frac{B_k}{n-k+1}$$ in other words $$B_n=1-{n\choose 0}\frac{B_0}{n-0+1}-{n\choose 1}\frac{B_1}{n-1+1}-\cdots -{n\choose n-1}\frac{B_{n-1}}{n-(n-1)+1}$$
Here, ${a\choose b}$ denotes a binomial coefficient. So, we begin with $B_0=1, B_1=\frac{1}{2}$, and we can calculate $B_2$ using the above recursive definition. That is, $B_2=1-{2\choose 0}\frac{B_0}{3}-{2\choose 1}\frac{B_1}{2}=1-\frac{1}{3}-2\frac{\frac{1}{2}}{2}=\frac{1}{6}$.
Now, with $B_2$ in hand, we can calculate $B_3$. And so on.