login
Number of primes p such that n < p < n + tau(n)^2 where tau(n) = A000005(n).
5

%I #30 Oct 25 2021 17:13:54

%S 0,2,1,3,1,5,0,5,3,5,1,10,0,4,4,6,1,9,0,8,3,4,0,14,2,4,4,9,1,14,0,8,4,

%T 4,4,19,0,4,4,15,1,14,0,8,8,4,0,19,1,8,3,8,0,14,3,14,4,5,1,29,0,3,7,

%U 11,4,13,0,8,4,13,1,27,0,3,8,8,3,13,0,19,5,3,0,26,2,3,3,13,0,27,3,7,4,5,5

%N Number of primes p such that n < p < n + tau(n)^2 where tau(n) = A000005(n).

%H David A. Corneth, <a href="/A069230/b069230.txt">Table of n, a(n) for n = 1..10000</a>

%e a(12) = 10 as there are 10 primes between (exclusive) 12 and 12 + tau(12)^2 = 12 + 6^2 = 12 + 36 = 48 namely the 10 primes 13, 17, 19, 23, 29, 31, 37, 41, 43, 47. - _David A. Corneth_, Sep 20 2020

%t Table[Count[Range[n+1,n+DivisorSigma[0,n]^2-1],_?PrimeQ],{n,100}] (* _Harvey P. Dale_, Oct 25 2021 *)

%o (PARI) a(n) = #select(x->isprime(x), vector(numdiv(n)^2-1, k, k+n)); \\ _Michel Marcus_, Jun 18 2017

%Y Cf. A000005, A069231, A069232, A069233.

%K nonn,easy

%O 1,2

%A _Benoit Cloitre_, Apr 13 2002