cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A322665 Partial sums of A089451.

Original entry on oeis.org

1, 0, 0, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 1, 2, 2, 3, 3, 2, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 0, 0, -1
Offset: 1

Views

Author

Jianing Song, Dec 22 2018

Keywords

Comments

a(n) is the number of primes p among the first n ones such that the sum of primitive roots is congruent to +1 modulo p minus the number of primes p among the first n ones such that the sum of primitive roots is congruent to -1 modulo p. Here, the prime number 2 is counted in the minuends but not in the subtrahends.
Although there are more positive terms among the first few ones, there are 5887 negative ones among the first 10000 terms, along with 237 zeros.
The largest terms among the first 10000 ones are a(n) = 41 for n in {8389, 8749, 8750, 8751, 8752, 8753}, and the smallest being a(n) = -41 for n in {4037, 4038, 4039, 4040, 4041, 4043, 4044, 4045, 4063, 4064, 4065, 4081, 4082, 4083, 4086, 4098, 4099, 4100}. What is the rate of growth for sup_{i=1..n} a(i) and inf_{i=1..n} a(i)?

Examples

			prime(11) = 31, mu(1) = mu(6) = mu(10) = mu(22) = +1, mu(2) = mu(30) = -1, so a(11) = 4 - 2 = 2.
prime(22) = 79, mu(1) = mu(6) = mu(10) = mu(22) = mu(46) = mu(58) = +1, mu(2) = mu(30) = mu(42) = mu(66) = mu(70) = mu(78) = -1, so a(22) = 6 - 6 = 0.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(i=1, n, moebius(prime(i)-1))