OFFSET
1,1
COMMENTS
From Kevin P. Thompson, Jun 20 2022: (Start)
Terms greater than 3 must be twice a square (see A064205).
No terms are congruent to 4 or 6 (mod 10) (see A064205).
(End)
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..5000 (terms 1..265 from Kevin P. Thompson)
EXAMPLE
162 is a term since sigma(162) - tau(162) = 363 - 10 = 353, which is prime.
MATHEMATICA
Do[ If[ PrimeQ[ DivisorSigma[1, n] - DivisorSigma[0, n]], Print[n]], {n, 1, 10^7}]
PROG
(PARI) { n=0; for (m=1, 10^9, if (isprime(sigma(m) - numdiv(m)), write("b065061.txt", n++, " ", m); if (n==100, return)) ) } \\ Harry J. Smith, Oct 05 2009
(Python)
from itertools import count, islice
from sympy import isprime, divisor_sigma as s, divisor_count as t
def agen(): # generator of terms
yield 3
yield from (k for k in (2*i*i for i in count(1)) if isprime(s(k)-t(k)))
print(list(islice(agen(), 30))) # Michael S. Branicky, Jun 20 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Nov 06 2001
EXTENSIONS
a(17)-a(28) from Harry J. Smith, Oct 05 2009
a(29)-a(30) from Kevin P. Thompson, Jun 20 2022
STATUS
approved