login
Numbers n such that n - number of divisors of n is a prime.
4

%I #17 Jan 19 2018 13:57:44

%S 5,6,7,13,15,16,19,21,27,31,33,35,43,51,57,61,65,73,77,87,93,103,105,

%T 109,111,135,139,141,143,151,155,161,165,177,181,183,185,189,193,199,

%U 201,203,215,229,231,237,241,245,267,271,275,283,285,287,313,321,335

%N Numbers n such that n - number of divisors of n is a prime.

%C Larger of the twin primes (A006512) is a term.

%H Harvey P. Dale, <a href="/A067531/b067531.txt">Table of n, a(n) for n = 1..1000</a>

%e 51 is a term as d(51) = 4 and 51-4 = 47 is a prime.

%p with(numtheory): for n from 3 to 500 do if isprime(n-tau(n)) then printf(`%d,`,n) fi:od: # _James A. Sellers_, Feb 18 2002

%t Select[Range[400],PrimeQ[#-DivisorSigma[0,#]]&] (* _Harvey P. Dale_, May 22 2013 *)

%Y Cf. A000005 (number of divisors of n), A006512.

%K easy,nonn

%O 1,1

%A _Amarnath Murthy_, Feb 17 2002

%E More terms from _James A. Sellers_, Feb 18 2002