Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Feb 27 2019 01:19:42
%S 5,6,7,10,13,16,20,22,24,27,32,35,36,37,45,46,48,49,50,51,58,61,62,64,
%T 68,73,74,76,80,82,91,92,99,100,106,115,117,120,123,124,143,144,146,
%U 152,153,157,164,166,168,169,170,174,178,187,188,193,196,206,212,224,225
%N A positive integer k is included if |d(k+1) - d(k)| is a prime, where d(k) is the number of divisors of k.
%H Harvey P. Dale, <a href="/A162317/b162317.txt">Table of n, a(n) for n = 1..1000</a>
%e 24 is in the sequence because |d(25) - d(24)| = |3 - 8| = 5 is a prime. - _Emeric Deutsch_, Jul 12 2009
%p with(numtheory): a := proc (n) if isprime(abs(tau(n+1)-tau(n))) = true then n else end if end proc: seq(a(n), n = 1 .. 250); # _Emeric Deutsch_, Jul 12 2009
%t Flatten[Position[Partition[DivisorSigma[0,Range[250]],2,1],_?(PrimeQ[Abs[ First[#]-Last[#]]]&),{1},Heads->False]] (* _Harvey P. Dale_, May 26 2014 *)
%Y Cf. A051950.
%K nonn
%O 1,1
%A _Leroy Quet_, Jul 01 2009
%E Extended by _Emeric Deutsch_, Jul 12 2009