login
The number of ways (2n)^2 is expressible as (p+1)(q+1) where p and q are distinct primes.
2

%I #8 Jul 10 2016 17:08:16

%S 0,0,1,0,0,3,0,1,2,0,0,4,0,1,1,1,0,4,0,2,3,1,0,4,0,1,1,2,0,5,0,1,2,1,

%T 1,4,0,1,3,1,0,7,0,2,4,0,0,4,0,2,3,1,0,2,0,2,0,0,0,9,0,0,2,0,0,5,0,3,

%U 0,2,0,8,0,0,2,2,2,6,0,2,2,1,0,6,0,1,1,2,0,8,1,1,1,0,0,2,0,1,0,4,0,4,0,2,5

%N The number of ways (2n)^2 is expressible as (p+1)(q+1) where p and q are distinct primes.

%C No odd number squared is expressible as (p+1)(q+1) where p and q are distinct primes, since q must be odd and therefore (q+1) is even.

%H Charles R Greathouse IV, <a href="/A274876/b274876.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 0 since 2 is not expressible as (p+1)(q+1); same for a(2); a(3) = 1 since 6^2 = 36 = (2+1)(11+1); a(6) = 3 since 12^2 = 144 = (2+1)(47+1) = (5+1)(23+1) = (7+1)(17+1); a(9) = 2 since 18^2 = 324 = (2+1)(107+1) = (5+1)(53+1); etc.

%t f[n_] := Block[{c = 0, p = 2}, While[p < 2n -1, If[ PrimeQ[(2n)^2/(p +1) -1], c++]; p = NextPrime@ p]; c]; Array[f, 105]

%o (PARI) a(n)=sumdiv(4*n^2,d, d<2*n && isprime(d-1) && isprime(4*n^2/d-1)) \\ _Charles R Greathouse IV_, Jul 10 2016

%Y Cf. A274848, A274877.

%K nonn

%O 1,6

%A _Zak Seidov_ and _Robert G. Wilson v_, Jul 10 2016