%I #110 Sep 08 2022 08:46:21
%S 1,1,1,16,1,36,1,64,27,100,1,144,1,196,75,256,1,324,1,400,49,484,1,
%T 576,125,676,243,784,1,900,1,1024,363,1156,1225,1296,1,1444,169,1600,
%U 1,1764,1,1936,135,2116,1,2304,343,2500,867,2704,1,2916,3025,3136,361,3364,1,3600,1,3844,1323,4096,845,4356,1
%N a(n) is the denominator of F(n) = A027641(n-1)/n + A027642(n-1)/n^2.
%C It seems that the numerator of F(n) is the numerator of (B(n-1) + 1/n), where B(k) is the k-th Bernoulli number; if so, for n > 2, the numerator of F(n) is A174341(n-1). How to prove it?
%C Conjecture: for n > 1, a(n) = 1 if and only if n is prime.
%C Is this conjecture equivalent to the Agoh-Giuga conjecture?
%C Theorem 1. If p is prime, then a(p) = 1. Proof. a(2) = 1, so let p be an odd prime. By the von Staudt-Clausen theorem, if k is even, then B(k) = A(k) - Sum_{prime q, q-1 | k} 1/q, where A(k) is an integer and the sum is over all primes q such that q-1 divides k. Thus B(k) = N(k)/D(k) with D(k) = Product_{prime q, q-1 | k} q. Now let k = p-1. Then N(p-1)/D(p-1) = B(p-1) = A(p-1) - 1/p - Sum_{prime q < p, q-1 | p-1} 1/q (*). Add 1/p to both sides of (*) and multiply by p*D(p-1) to get p*N(p-1) + D(p-1) = p*D(p-1)*(A(p-1) - Sum_{prime q < p, q-1 | p-1} 1/q) (**). Now p | D(p-1), so p^2 | p*D(p-1) in (**). The denominators on the right side of (**) are all of the form q < p. Therefore, p^2 divides both sides of (**). Hence F(p) = N(p-1)/p + D(p-1)/p^2 is an integer, so a(p) = 1. - _Jonathan Sondow_, Jul 14 2019
%C Conjecture: composite numbers n such that a(n) is squarefree are only the Carmichael numbers A002997. Cf. A309235. - _Thomas Ordowski_, Jul 15 2019
%C Conjecture checked up to n = 101101. - _Amiram Eldar_, Jul 16 2019
%C Theorem 2. If n is a prime or a Carmichael number, then a(n) = A326690(n) = denominator of (Sum_{prime p | n} 1/p - 1/n). The proof is a generalization of that of Theorem 1. (Note that Theorem 2 implies Theorem 1, since if n is prime, then (Sum_{prime p | n} 1/p - 1/n) = 1/n - 1/n = 0/1, so a(p) = A326690(n) = 1.) For n a prime or a Carmichael number, an application of Theorem 2 is computing a(n) without calculating Bernoulli(n-1) which may be huge; see A309268 and A326690. - _Jonathan Sondow_, Jul 19 2019
%C The values of F(n) when n is prime are A327033. - _Jonathan Sondow_, Aug 16 2019
%H Amiram Eldar, <a href="/A309132/b309132.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/vonStaudt-ClausenTheorem.html">von Staudt-Clausen Theorem</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Agoh-Giuga_conjecture">Agoh-Giuga conjecture</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Bernoulli_number#Related_sequences">Bernoulli number: Related sequences</a>
%F a(p) = 1 for prime p.
%F a(2k) = (2k)^2 for k > 1.
%F Conjecture: for k > 0, a(2k+1) = (2k+1)^2 iff 2k+1 is in A121707.
%F Denominator(F(p)/p) = 1 for the primes p = 2 and p = 1277 but for no other prime p < 1.5 * 10^4. Does denominator(F(p)/p) = 1 for any prime p > 1.5 * 10^4? - _Jonathan Sondow_, Jul 14 2019
%F Similarly, Sum_{k=1..p-1} k^(p-1) == -1 (mod p^2) for the prime p = 1277. - _Thomas Ordowski_, Jul 15 2019
%F a(n) = denominator(Sum_{prime p | n} 1/p - 1/n) if n is a prime or a Carmichael number. - _Jonathan Sondow_, Jul 19 2019
%e F(n) = 2/1, 0/1, 1/1, 1/16, 1/1, 1/36, 1/1, 1/64, 7/27, 1/100, 1/1, 1/144, -37/1, 1/196, 37/75, 1/256, -211/1, 1/324, 2311/1, 1/400, -407389/49, ...
%t Table[Denominator[Numerator[BernoulliB[n - 1]] / n + Denominator[ BernoulliB[ n - 1]] / n^2], {n, 70}] (* _Vincenzo Librandi_, Jul 14 2019 *)
%o (PARI) a(n) = denominator(numerator(bernfrac(n-1))/n + denominator(bernfrac(n-1))/n^2); \\ _Michel Marcus_, Jul 14 2019
%o (Magma) [Denominator(Numerator(Bernoulli(n-1))/n + Denominator(Bernoulli(n-1))/n^2): n in [1..70]]; // _Vincenzo Librandi_, Jul 14 2019
%Y Cf. A000040, A000146, A002997, A027641, A027642, A110936, A166062, A174341, A174342, A309235, A326690, A327033.
%K nonn,frac
%O 1,4
%A _Thomas Ordowski_, Jul 14 2019