OFFSET
1,4
PROG
(PARI) twtotwp2(n, n2, k) = { local(x, y, x2, c); c=0; forprime(x=n, n2, x2=x+2; y=x^x2+k; if(y%x2==0 && !isprime(x2), c++; print1(x+2", "); ); ); print(); print(c", "pitwin(n2)) }
pitwins(n) = \\The number of twin prime pairs <= n.
{ local(c, x); c=0; forprime(x=3, n, if(isprime(x+2), c++) ); return(c) }
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Cino Hilliard, Jan 09 2005
EXTENSIONS
Offset corrected and a(6)-a(19) added by Amiram Eldar, Jan 10 2020
STATUS
approved