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.

A368457 a(n) = 2*(Bacher(n) - sigma(n)) + n + 1 = 2*(A368207(n) - A000203(n)) + n + 1.

Original entry on oeis.org

2, 1, 0, 1, 0, -1, 0, -5, 2, -7, 0, -7, 0, -9, -4, -7, 0, -19, 0, -9, -10, -13, 0, -27, 4, -15, -12, -23, 0, -25, 0, -29, -14, -19, 0, -43, 0, -21, -16, -41, 0, -33, 0, -39, -28, -25, 0, -59, 6, -41, -20, -45, 0, -53, -16, -39, -22, -31, 0, -99, 0, -33, -20
Offset: 1

Views

Author

Peter Luschny, Dec 26 2023

Keywords

Comments

We can use the Bacher numbers A368207 to measure the primeness of a positive integer, similar to how the number of prime factors of an integer does, but based on the number of representations of n as w*x + y*z where max(w, x) < min(y, z).
Bacher's theorem shows that a(n) = 0 if n is an odd prime. Conversely, if a(n) = 0, we cannot conclude that n is prime as the example n = 35 shows, but this is probably the only exception.
Of the first 32,000 terms, approximately 88% are less than 0, 11% are equal to 0, and 1% are greater than 0. A368458 gives the indices for which a(n) is positive, and A368459 those for which a(n) is negative.
It appears that a(p^2) = p - 1 (A006093) for all prime p, following the observation by Knuth that apparently A368207(p^2) = (p^2 + 3*p)/2.

Crossrefs

Programs

  • Julia
    using Nemo
    A368457(n) = 2 * (A368207(n) - divisor_sigma(n, 1)) + n + 1
    println([A368457(n) for n in 1:63])
  • Mathematica
    t[n_]:=t[n]=Select[Divisors[n], #^2<=n&];
    A368207[n_]:=Sum[(1+Boole[d^2A368457[n_]:=2(A368207[n]-DivisorSigma[1,n])+n+1;
    Array[A368457, 100] (* Paolo Xausa, Jan 02 2024 *)