This site is supported by donations to The OEIS Foundation.

# User:Daniel Suteu

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

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.

Sidef tutorial:

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 also be tried online at: https://tio.run/#sidef.

WWW:

- GitHub profile
- NotABug 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 Abundant Fermat pseudoprimes
- 9 Abundant Carmichael numbers
- 10 Abundant Lucas-Carmichael numbers
- 11 Agrawal's conjecture
- 12 Upper-bounds to some OEIS sequences
- 12.1 Smallest anti-Carmichael Fermat psp-2 with prime factors
- 12.2 Smallest imprimitive Carmichael number with prime factors
- 12.3 Smallest super-pseudoprime to base 2 with prime factors
- 12.4 Smallest super-pseudoprime to base 2 Carmichael number with prime factors
- 12.5 Smallest overpseudoprime to base 2 Carmichael number with prime factors
- 12.6 Smallest overpseudoprime to base 2 with prime factors

- 13 Math scripts
- 14 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.

## Abundant Fermat pseudoprimes

On 17 December 2017, Shyam Sunder Gupta published the following problem on their website: "Can you find the smallest abundant number which is also pseudoprime (base-2)?".

On 9th November 2019, I generated 42 abundant Fermat pseudoprimes to base 2, the smallest one in my list being the following 40-digit number:

Meanwhile, I generated a few more abundant pseudoprimes to base 2, which can be found here.

Update (28 August 2022): using a new idea, I generated two smaller abundant Fermat pseudoprimes to base 2:

Update (10 March 2023): using the same idea as above, I've found two smaller abundant Fermat pseudoprimes to base 2:

Challenge: find a smaller abundant Fermat pseudoprime to base 2, or prove that there is no smaller one.

## Abundant Carmichael numbers

Inspired by Shyam Sunder Gupta's problem, in A329460, Amiram Eldar asked the question: "Do abundant Carmichael numbers exist?".

On 15th August 2020, I answered the question in positive (source code) by generating the following 97-digit abundant Carmichael number, showing that abundant Carmichael numbers do exist:

In constructing abundant Carmichael numbers, one important idea (source code) is the following: if a Carmichael number is a multiple of an odd abundant cyclic number, such as:

or

then it will be abundant. Since the above multipliers are both odd abundant cyclic numbers and all odd cyclic numbers seem to have Carmichael multiples, suggests that infinitely many abundant Carmichael numbers do exist.

A day later, I constructed a slightly smaller (88-digit) abundant Carmichael number (but, most likely, it's still not the smallest one):

Challenge: find an abundant Carmichael number divisible by 3.

Open problem: find the smallest abundant Carmichael number.

A list of Carmichael numbers with abundancy index > 1.9 can be found here.

## Abundant Lucas-Carmichael numbers

A related question would be: "do abundant Lucas-Carmichael numbers exist?". The answer is "yes"!

For generating abundant Lucas-Carmichael numbers, we used a similar method as in the generation of abundant Carmichael numbers.

First, we generated odd squarefree (almost) abundant numbers (source code), satisfying , where is the Dedekind psi function. Such a number must be a term of A255602.

Then we used a modified version of Erdős's construction method for Carmichael numbers, adapted to the construction of Lucas-Carmichael numbers (source code) and also with support for using our multiplier with its corresponding lambda value .

The smallest abundant Lucas-Carmichael number that I was able to find so far, is the following 70-digit number:

It is conjectured that every term of A255602 is a divisor of a Lucas-Carmichael number. The smallest such multiples are given in A253598. If the conjecture is true, then there exists infinitely many abundant Lucas-Carmichael numbers, as the A255602 sequence includes infinitely many abundant terms.

Challenge: find an abundant Lucas-Carmichael number divisible by 3.

Open problem: find the smallest abundant Lucas-Carmichael number.

Several upper-bounds to A253598 are listed here.

A list of Lucas-Carmichael numbers with abundancy index > 1.9 is available here.

## Agrawal's conjecture

In the article Remarks on Agrawal's conjecture, Hendrick Lenstra showed that if a Carmichael number, with an odd number of prime factors , is also a Lucas-Carmichael number, then it would be a counter-example to Agrawal's conjecture (cf. A329223).

Currently, only the following such Carmichael numbers are known, but none of them is also a Lucas-Carmichael number:

More Fermat pseudoprimes to base 2 with these properties, can be found here.

## Upper-bounds to some OEIS sequences

### Smallest anti-Carmichael Fermat psp-2 with prime factors

Thomas Ordowski defined the following interesting sequence: A316908 is the smallest with prime factors such that and does not divide for every prime dividing .

More upper-bounds can be found here.

### Smallest imprimitive Carmichael number with prime factors

Amiram Eldar defined the following interesting sequence: A328938 is the smallest imprimitive Carmichael number with prime factors.

An imprimitive Carmichael number is defined to be a Carmichael number, , such that:

The list of imprimitive Carmichael numbers is given by A328935.

More upper-bounds can be found here.

### Smallest super-pseudoprime to base 2 with prime factors

Also submitted by Amiram Eldar, the sequence A328665 lists the smallest super-pseudoprime to base 2 with prime factors.

The list of super-pseudoprimes to base 2 is given by A050217.

More upper-bounds can be found here.

### Smallest super-pseudoprime to base 2 Carmichael number with prime factors

In 2017, Max Alekseyev and Thomas Ordowski submitted the A291637 sequence, which lists the Carmichael numbers that are also super-pseudoprimes to base .

Letting to be the smallest such number with n prime factors, we have:

By using the tables of pseudoprimes up to , we find that .

A list of terms with or more prime factors, can be found here.

### Smallest overpseudoprime to base 2 Carmichael number with prime factors

The sequence A352987 lists the Carmichael numbers that are also overpseudoprimes to base 2.

Letting to be the smallest such number with n prime factors, we have:

A list of terms with or more prime factors, can be found here

### Smallest overpseudoprime to base 2 with prime factors

Inspired by the A328665 sequence, in A353409 we list the smallest overpseudoprime to base 2 with distinct prime factors.

Some upper-bounds to this sequence are:

More upper-bounds can be found here.