|
|
A108258
|
|
Consider primes p and q such that p = 3^k + 20 and q = 3^(k+1) + 20 for some k; sequence gives values of q.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
3^1 + 20 = 23, 3^2 + 20 = 29.
|
|
MATHEMATICA
|
Transpose[Select[Partition[#+20&/@(3^Range[50]), 2, 1], AllTrue[ #, PrimeQ]&]] [[2]] (* The program uses the function AllTrue from Mathematica version 10 *) (* Harvey P. Dale, Oct 29 2014 *)
|
|
PROG
|
(PARI) g(m, n, b) = { for(x=0, n, y=m+b^x+b%2; z=m+b^(x+1)+b%2; if(isprime(y)&isprime(z), print1(z", ") ) ) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|