OFFSET
1,1
COMMENTS
Let p(k) be the k-th prime; sequence gives p(k) such that p(k+2) - p(k+1) = p(k+1) - p(k) = 6.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
EXAMPLE
47 is a term as the next two primes are 53 and 59.
MATHEMATICA
ok[p_] := (q = NextPrime[p]) == p+6 && NextPrime[q] == q+6; Select[Prime /@ Range[1000], ok][[;; 45]] (* Jean-François Alcover, Jul 11 2011 *)
Transpose[Select[Partition[Prime[Range[1000]], 3, 1], Differences[#]=={6, 6}&]] [[1]] (* Harvey P. Dale, Apr 25 2014 *)
PROG
(PARI) is_A047948(n)={nextprime(n+1)==n+6 && nextprime(n+7)==n+12 && isprime(n)} \\ Charles R Greathouse IV, Aug 17 2011, simplified by M. F. Hasler, Jan 13 2013
(PARI) p=2; q=3; forprime(r=5, 1e4, if(r-p==12&&q-p==6, print1(p", ")); p=q; q=r) \\ Charles R Greathouse IV, Aug 17 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
Corrected by T. D. Noe, Mar 07 2008
STATUS
approved