OFFSET
1,1
COMMENTS
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 2141 (a prime); previous prime is 2137; next prime is 2143.
The numbers of divisors between are:
+ d(2138) = 4 + d(2142) = 24
+ d(2139) = 8
+ d(2140) = 12
------------------------------------------
sum = 24 sum = 24 Sums are equal. Thus 2141 is a term.
MATHEMATICA
Select[Prime[Range[5000]], Total[DivisorSigma[0, Range[NextPrime[#, -1], #]]] == Total[DivisorSigma[0, Range[#, NextPrime[#]]]] &] (* Amiram Eldar, May 11 2022 *)
PROG
(Python)
def sotsb(a, b): return sum(A000005(n) for n in range(a+1, b))
# sotsb stands for the "sum of taus strictly between (a and b)"
print([A000040[n] for n in range(2, 5400) if sotsb(A000040[n-1], A000040[n]) == sotsb(A000040[n], A000040[n+1])])
(PARI) isok(p) = isprime(p) && sum(k=precprime(p-1), p, numdiv(k)) == sum(k=p, nextprime(p+1), numdiv(k)); \\ Michel Marcus, May 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl-Heinz Hofmann, May 10 2022
STATUS
approved