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.
%I A368457 #25 Jan 02 2024 06:07:07 %S A368457 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, %T A368457 -15,-12,-23,0,-25,0,-29,-14,-19,0,-43,0,-21,-16,-41,0,-33,0,-39,-28, %U A368457 -25,0,-59,6,-41,-20,-45,0,-53,-16,-39,-22,-31,0,-99,0,-33,-20 %N A368457 a(n) = 2*(Bacher(n) - sigma(n)) + n + 1 = 2*(A368207(n) - A000203(n)) + n + 1. %C A368457 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). %C A368457 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. %C A368457 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. %C A368457 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. %H A368457 Peter Luschny, <a href="/A368457/b368457.txt">Table of n, a(n) for n = 1..10000</a> %H A368457 Roland Bacher, <a href="https://doi.org/10.1080/00029890.2023.2242034">A quixotic proof of Fermat's two squares theorem for prime numbers</a>, American Mathematical Monthly, Vol. 130, No. 9 (November 2023), 824-836; <a href="https://arxiv.org/abs/2210.07657">arXiv version</a>, arXiv:2210.07657 [math.NT], 2022. %t A368457 t[n_]:=t[n]=Select[Divisors[n], #^2<=n&]; %t A368457 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]}]; %t A368457 A368457[n_]:=2(A368207[n]-DivisorSigma[1,n])+n+1; %t A368457 Array[A368457, 100] (* _Paolo Xausa_, Jan 02 2024 *) %o A368457 (Julia) %o A368457 using Nemo %o A368457 A368457(n) = 2 * (A368207(n) - divisor_sigma(n, 1)) + n + 1 %o A368457 println([A368457(n) for n in 1:63]) %Y A368457 Cf. A000203, A001358, A001248, A006093, A368207, A368458, A368459, A368460. %K A368457 sign %O A368457 1,1 %A A368457 _Peter Luschny_, Dec 26 2023