A232194 Number of ways to write n = x + y (x, y > 0) with n*x + y and n*y - x both prime.
0, 0, 1, 1, 2, 1, 2, 2, 2, 3, 3, 3, 2, 3, 4, 2, 4, 2, 3, 1, 5, 4, 4, 1, 4, 3, 8, 3, 7, 2, 6, 3, 7, 4, 9, 3, 5, 4, 6, 3, 8, 4, 7, 5, 8, 3, 7, 4, 6, 3, 8, 3, 8, 2, 12, 4, 9, 4, 9, 4, 10, 3, 9, 7, 10, 5, 9, 4, 10, 4, 6, 5, 8, 3, 7, 5, 11, 7, 9, 8, 11, 5, 11, 8, 13, 4, 9, 5, 8, 7, 12, 6, 9, 5, 15, 7, 10, 5, 15, 10
Offset: 1
Keywords
Examples
a(3) = 1 since 3 = 1 + 2 with 3*1 + 2 = 3*2 - 1 = 5 prime. a(4) = 1 since 4 = 1 + 3 with 4*1 + 3 = 7 and 4*3 - 1 = 11 both prime. a(6) = 1 since 6 = 1 + 5 with 6*1 + 5 = 11 and 6*5 - 1 = 29 both prime. a(20) = 1 since 20 = 9 + 11 with 20*9 + 11 = 191 and 20*11 - 9 = 211 both prime. a(24) = 1 since 24*19 + 5 = 461 and 24*5 - 19 = 101 both prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, preprint, arXiv:1211.1588.
Programs
-
Mathematica
a[n_]:=Sum[If[PrimeQ[n*x+(n-x)]&&PrimeQ[n*(n-x)-x],1,0],{x,1,n-1}] Table[a[n],{n,1,100}]
Comments