This site is supported by donations to The OEIS Foundation.

# User:Daniel Suteu

Open-source software developer, with main interests in programming languages, algorithms, mathematics (number theory), poetry and science.

In March 2013, I started the Sidef programming language project, which combines many good things from good languages, trying to make programming easier and more enjoyable, focusing primarily on simplicity, elegance and readability.

Among other things, the language comes with fast built-in methods for primality testing and prime factorization, along with many other number-theoretic functions, most of them provided by Dana Jacobsen's excellent Math::Prime::Util::GMP module. Also built-in, we have support for arbitrary large integers, rationals, floats and complex numbers, using the GMP, MPFR and MPC libraries.

The language can be tried online at: https://tio.run/#sidef.

WWW:

- GitHub profile
- GitLab profile
- CPAN profile
- RosettaCode profile
- OEIS contributions
- Submitted sequences
- Blog about math and programming

## Contents

- 1 Partial sums of arithmetical functions
- 2 Partial sums of the sigma function
- 3 Partial sums of the Jordan totient function
- 4 Partial sums of the Dedekind psi function
- 5 Partial sums of the omega(n) and bigomega(n) functions
- 6 Partial sums - OEIS sequences
- 7 Generalized Pillai arithmetical function
- 8 Math scripts
- 9 Computer-generated images

## Partial sums of arithmetical functions

For any arithmetical function , we have the following identity (for m >= 0):

where are the Faulhaber polynomials, defined as:

where are the Bernoulli polynomials. The Faulhaber polynomials are particularly useful in efficiently summing the m-th powers of the first n positive integers (with m >= 0):

...and are also useful in efficiently computing second partial sums of m-th powers (sums of power sums) with m >= 0:

In this section, we're interested in computing the following partial sum in sublinear time, with m >= 0, where is an arithmetical function:

If the partial sums of can be computed efficiently:

then it's possible to create the following sublinear formula:

More generally, the partial sums over the Dirichlet convolution of two arithmetic functions and , can be computed in sublinear time, if the individual partial sums of and can be computed efficiently:

Assuming that and can be computed efficiently, then we can use the Dirichlet hyperbola method to compute the following partial sum in sublinear time:

More on this at: https://trizenx.blogspot.com/2018/11/partial-sums-of-arithmetical-functions.html

## Partial sums of the sigma function

For m >= 0 and j >= 0, we have:

which can be computed in sublinear time by using the Dirichlet hyperbola method:

where are the Faulhaber polynomials.

An asymptotic approximation to this partial sum, with m >= 0 and j >= 1, is given by the following formula:

where is the Riemann zeta function.

## Partial sums of the Jordan totient function

The Jordan totient function is a generalization of the Euler totient function, and is defined as:

and is multiplicative with:

An elegant formula for computing partial sums of the Jordan totient function, is given in terms of the Möbius function and the Faulhaber polynomials:

An asymptotic approximation to this partial sum, with m >= 1, is given by:

where is the Riemann zeta function.

## Partial sums of the Dedekind psi function

The generalized Dedekind psi function can be defined in terms of the Jordan totient function, as:

and is multiplicative with:

Partial sums of the Dedekind psi function can be expressed in terms of the absolute value of the Möbius function and the Faulhaber polynomials:

with the following asymptotic approximation for m >= 1:

where is the Riemann zeta function.

## Partial sums of the omega(n) and bigomega(n) functions

We define the generalized and functions as:

where are primes dividing , with multiplicity .

For we have the following sequences:

A001221(n)

A069359(n)

A322078(n)

Similarly, for , we have:

A001222(n)

A095112(n)

A322664(n)

Partial sums of this functions can be expressed in terms of the Faulhaber polynomials, as:

where and (with k>=1) run over the prime numbers and the prime powers, respectively, less than or equal to .

For m>=1, the partial sums of can be described asymptotically as:

where are the Faulhaber polynomials and is the Prime zeta function, defined as:

Very similarly, for m>=1, the partial sums of satisfy:

where are the Faulhaber polynomials and is defined as:

where runs over the prime numbers.

## Partial sums - OEIS sequences

Considering the following partial sum, where is an arithmetic function and are the Faulhaber polynomials:

gives us the following table of interesting sequences:

+------------+------------+------------+ | f(k) | R_0(n) | R_1(n) | +------------+------------+------------+ | A000012(k) | A006218(n) | A024916(n) | | A000027(k) | A024916(n) | A143127(n) | | A010051(k) | A013939(n) | A322068(n) | | A069513(k) | A022559(n) | A328893(n) | | A008966(k) | A064608(n) | A173290(n) | | A008683(k) | A000012(n) | A002088(n) | | A000290(k) | A064602(n) | A143128(n) | | A000010(k) | A000217(n) | A272718(n) | | A034444(k) | A061503(n) | A306775(n) | | A007434(k) | A000330(n) | | +------------+------------+------------+

## Generalized Pillai arithmetical function

For any arithmetical function , we have the following identity:

where is the Euler totient function.