OFFSET
1,2
COMMENTS
Twin primes satisfy the same property, so A001359 is included in this sequence.
LINKS
Christian Aebi and Grant Cairns, A property of twin primes, Integers 12(2012), A7.
PROG
(PARI) isptp (p) = {local(pq); pq = p*(p+2); if (prod(x=1, pq, if (issquare(Mod(x, pq)) && (gcd(x, pq) == 1), x, 1)) % pq == ((p+1) * ((-1)^((p+1)/2))) % pq , return(1), return(0)); } allptp(n) = {local(i, p, q); p = []; q = []; forstep (i=1, n, 2, if (isptp(i), p = concat(p, i); q = concat(q, i+2); ); ); print(p); print(q); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Sep 05 2012
STATUS
approved