login
Number of pairs of primes (p,q), p < q, which are a solution of the Diophantine equation (p-1)*(q-1) = (2n)^2.
3

%I #42 Aug 16 2019 16:24:53

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

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

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

%N Number of pairs of primes (p,q), p < q, which are a solution of the Diophantine equation (p-1)*(q-1) = (2n)^2.

%C a(n) is also the number of semiprimes p*q whose totient is a square (A247129) and equal to (2*n)^2.

%C From _Robert G. Wilson v_, Mar 30 2019, Mar 30 2019: (Start)

%C First occurrence of k=1,2,3,...: 1, 3, 10, 27, 60, 72, 120, 180, 270, 480, 252, 1155, 720, 792, 1260, 630, ..., . = A307245.

%C Start of table:

%C a(k_i) = n:

%C \i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...

%C n\

%C 0 11 17 19 23 29 31 34 38 39 41 43 46 49 51 53 ...

%C 1 1 2 4 5 7 8 9 13 14 15 16 21 22 25 26 ...

%C 2 3 6 54 56 58 87 100 115 116 123 138 148 160 170 176 ...

%C 3 10 12 18 20 24 28 30 36 40 42 48 84 88 99 144 ...

%C 4 27 33 45 63 66 70 75 80 112 126 135 153 156 162 165 ...

%C 5 60 78 90 102 140 168 200 260 264 285 288 315 378 408 432 ...

%C 6 72 105 108 130 150 306 348 357 450 495 528 560 672 696 708 ...

%C 7 120 132 240 297 312 330 390 588 750 882 980 1140 1176 1190 1215 ...

%C 8 180 198 210 280 396 468 540 612 648 700 810 910 945 960 1020 ...

%C 9 270 420 660 858 918 990 1248 1620 1782 1920 2088 2184 2352 2376 2688 ...

%C ... (End).

%C If n is a prime <> 3, then a(n) = 1 if n is in A052291 and 0 otherwise, and a(n^2) = 1 if 2*n+1 and 2*n^3+1 are primes and 0 otherwise. - _Robert Israel_, Apr 04 2019

%H Robert Israel, <a href="/A306722/b306722.txt">Table of n, a(n) for n = 1..10000</a>

%e a(2) = 1 because (2*2)^2 = (2-1) * (17-1), also, phi(2*17) = 4^2.

%e a(3) = 2 because (2*3)^2 = (2-1) * (37-1) = (3-1) * (19-1), also, phi(2*37) = phi(3*19) = 6^2.

%e a(11) = 0 because (2*11)^2 can't be written as (p-1)*(q-1) with p < q.

%p f:= proc(n) local w;

%p w:= (2*n)^2;

%p nops(select(t -> t < 2*n and isprime(t+1) and isprime(w/t + 1), numtheory:-divisors(w)))

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Apr 04 2019

%t f[n_] := Length@ Select[ Divisors[ 4n^2], # < 2n && PrimeQ[# + 1] && PrimeQ[ 4n^2/# + 1] &]; Array[f, 81] (* _Robert G. Wilson v_, Mar 30 2019 *)

%o (PARI) a(n) = {my(nb = 0, nn = 4*n^2); fordiv(nn, d, if (d == 2*n, break); if (isprime(d+1) && isprime(nn/d+1), nb++);); nb;} \\ _Michel Marcus_, Mar 06 2019

%Y Cf. A039770, A052291, A062732, A221284, A221285, A247129, A306440, A307245.

%K nonn

%O 1,3

%A _Bernard Schott_, Mar 06 2019