A219864 Number of ways to write n as p+q with p and 2pq+1 both prime.
0, 0, 1, 1, 2, 3, 0, 2, 4, 2, 2, 4, 1, 2, 6, 3, 1, 2, 2, 5, 3, 1, 1, 7, 2, 6, 3, 1, 6, 8, 2, 2, 5, 3, 3, 8, 2, 4, 6, 3, 4, 4, 1, 3, 7, 2, 3, 7, 3, 6, 8, 2, 1, 12, 5, 4, 7, 4, 7, 7, 7, 5, 4, 4, 6, 9, 2, 2, 13, 2, 5, 7, 2, 4, 18, 6, 3, 5, 6, 5, 8, 4, 2, 9, 4, 10, 5, 2, 5, 17, 3, 3, 7, 7, 5, 8, 3, 3, 17, 8
Offset: 1
Keywords
Examples
a(10)=2 since 10=3+7=7+3 with 2*3*7+1=43 prime. a(263)=1 since 83 is the only prime p with 2p(263-p)+1 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.
Programs
-
Mathematica
a[n_]:=a[n]=Sum[If[PrimeQ[2Prime[k](n-Prime[k])+1]==True,1,0],{k,1,PrimePi[n]}] Do[Print[n," ",a[n]],{n,1,1000}]
Comments