login
Denominator of the fraction (Sum_{prime p | n} 1/p - 1/n).
15

%I #64 Dec 31 2023 10:24:21

%S 1,1,1,4,1,3,1,8,9,5,1,4,1,7,15,16,1,9,1,20,7,11,1,24,25,13,27,28,1,1,

%T 1,32,33,17,35,36,1,19,13,40,1,21,1,44,45,23,1,16,49,25,51,52,1,27,11,

%U 8,19,29,1,60,1,31,63,64,65,11,1,68,69,35,1,72

%N Denominator of the fraction (Sum_{prime p | n} 1/p - 1/n).

%C Theorem. If n is a prime or a Carmichael number, then a(n) = A309132(n) = denominator of (N(n-1)/n + D(n-1)/n^2), where B(k) = N(k)/D(k) is the k-th Bernoulli number. This is a generalization of Theorem 1 in A309132 that A309132(p) = 1 if p is a prime. The proof generalizes that in A309132. As an application of Theorem, for n a prime or a Carmichael number one can compute A309132(n) without calculating Bernoulli numbers; see A309268.

%C A composite number n is a Giuga number A007850 if and only if a(n) = 1. (In fact, Sum_{prime p | n} 1/p - 1/n = 1 for all known Giuga numbers n.)

%C Semiprimes m = pq such that 1/p + 1/q - 1/m = p/q are exactly A190275. - _Amiram Eldar_ and _Thomas Ordowski_, Jul 22 2019

%C The preceding comment may be rephrased as "Semiprimes m = pq such that A326689(m) = p and a(m) = q are exactly A190275." - _Jonathan Sondow_, Jul 22 2019

%C More generally, semiprimes m = pq such that 1/p + 1/q - 1/m = P/Q are exactly A190273, where P <> Q are primes. In other words, semiprimes m such that A326689(m) is prime and a(m) is prime are exactly A190273. - _Amiram Eldar_ and _Thomas Ordowski_, Jul 25 2019

%H Antti Karttunen, <a href="/A326690/b326690.txt">Table of n, a(n) for n = 1..16384</a>

%H Antti Karttunen, <a href="/A326690/a326690.txt">Data supplement: n, a(n) computed for n = 1..65537</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Bernoulli_number">Bernoulli number</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Carmichael_number">Carmichael number</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Giuga_number">Giuga number</a>

%F a(n) = 1 if n is a prime or a Giuga number A007850.

%F a(n) = denominator of (N(n-1)/n + D(n-1)/n^2) if n is a Carmichael number A002997.

%F a(n) = denominator((A069359(n) - 1)/n). - _Peter Luschny_, Jul 22 2019

%e -1/1, 0/1, 0/1, 1/4, 0/1, 2/3, 0/1, 3/8, 2/9, 3/5, 0/1, 3/4, 0/1, 4/7, 7/15, 7/16, 0/1, 7/9, 0/1, 13/20, 3/7, 6/11, 0/1, 19/24, 4/25, 7/13, 8/27, 17/28, 0/1, 1/1

%e a(12) = denominator of (Sum_{prime p | 12} 1/p - 1/12) = denominator of (1/2 + 1/3 - 1/12) = denominator of 3/4 = 4.

%e Computing A309132(561) involves numerator(B(560)) which has 865 digits. But 561 is a Carmichael number, so Theorem implies A309132(561) = a(561) = denominator(1/3 + 1/11 + 1/17 - 1/561) = denominator(90/187) = 187.

%p A326690 := n -> denom((A069359(n)-1)/n):

%p seq(A326690(n), n=1..72); # _Peter Luschny_, Jul 22 2019

%t PrimeFactors[n_] := Select[Divisors[n], PrimeQ];

%t f[n_] := Denominator[Sum[1/p, {p, PrimeFactors[n]}] - 1/n];

%t Table[ f[n], {n, 100}]

%o (PARI) a(n) = denominator(sumdiv(n, d, isprime(d)/d) - 1/n); \\ _Michel Marcus_, Jul 19 2019

%o (SageMath)

%o p = lambda n: [n//f[0] for f in factor(n)]

%o A326690 = lambda n: ((sum(p(n)) - 1)/n).denominator()

%o [A326690(n) for n in (1..72)] # _Peter Luschny_, Jul 22 2019

%o (Magma) [1] cat [Denominator(&+[1/p:p in PrimeDivisors(k)]-1/k):k in [2..72]]; // _Marius A. Burtea_, Jul 27 2019

%Y Numerators are A326689. Quotients n/a(n) are A326691.

%Y Cf. A069359, A007947 (denominator of Sum_{prime p | n} 1/p).

%Y Cf. A002997, A007850, A190275, A309132, A309235, A309268, A309378, A326692.

%K nonn,frac

%O 1,4

%A _Jonathan Sondow_, Jul 18 2019