OFFSET
1,1
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.
LINKS
Peter Luschny, Table of n, a(n) for n = 1..10000
Roland Bacher, A quixotic proof of Fermat's two squares theorem for prime numbers, American Mathematical Monthly, Vol. 130, No. 9 (November 2023), 824-836; arXiv version, arXiv:2210.07657 [math.NT], 2022.
MATHEMATICA
t[n_]:=t[n]=Select[Divisors[n], #^2<=n&];
A368207[n_]:=Sum[(1+Boole[d^2<n])(2d-1), {d, t[n]}]+Sum[If[wx<y*w, Max[1, 2(Boole[w^2<wx]+Boole[y^2<n-wx])], 0], {wx, Floor[n/2]}, {w, t[wx]}, {y, t[n-wx]}];
Array[A368457, 100] (* Paolo Xausa, Jan 02 2024 *)
PROG
CROSSREFS
KEYWORD
sign
AUTHOR
Peter Luschny, Dec 26 2023
STATUS
approved