A091182 Number of ways to write n = x + y (x >= y > 0) with xy - 1 and xy + 1 both prime.
0, 0, 0, 1, 2, 0, 2, 1, 1, 0, 2, 0, 3, 0, 0, 1, 4, 1, 2, 0, 1, 1, 3, 1, 1, 0, 2, 2, 3, 0, 6, 3, 1, 1, 1, 1, 3, 4, 3, 0, 3, 1, 4, 2, 0, 1, 4, 1, 4, 1, 1, 3, 7, 0, 1, 1, 2, 1, 4, 0, 3, 2, 3, 4, 1, 0, 9, 2, 2, 1, 5, 1, 6, 1, 0, 3, 6, 1, 5, 0, 2, 3, 7, 1, 1, 2, 2
Offset: 1
Examples
a(8)=1 since 8=6+2 with 6*2-1 and 6*2+1 both prime. a(11)=2 since 11=6+5=9+2 with 6*5-1, 6*5+1, 9*2-1, 9*2+1 all prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..50000 (first 10000 terms from T. D. Noe)
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.
Programs
-
Maple
with(numtheory); a:=n->sum( (pi((i)*(n-i)+1) - pi((i)*(n-i)))*(pi((i)*(n-i)-1) - pi((i)*(n-i) - 2)) , i=1..floor(n/2) ); seq(a(k),k=1..100); # Wesley Ivan Hurt, Jan 21 2013
-
Mathematica
Table[cnt = 0; Do[If[PrimeQ[k*(n - k) - 1] && PrimeQ[k*(n - k) + 1], cnt++], {k, n/2}]; cnt, {n, 100}] (* Zhi-Wei Sun, edited by T. D. Noe, Nov 29 2012 *)
Extensions
Edited by N. J. A. Sloane, Nov 29 2012
Comments