OFFSET
1,1
COMMENTS
Primes prime(m) such that prime(m+8) = prime(m) + 30. - Zak Seidov, Jul 06 2015
LINKS
Zak Seidov, Table of n, a(n) for n = 1..651 (Essentially original b-file by Tim Johannes Ohrtmann, just added a(1)=7 and corrected EndOfFile)
Tony Forbes and Norman Luhn, Smallest Prime k-tuplets
MATHEMATICA
{p, q, r, s, t, u, v, w, x} = Prime@ Range@ 9; lst = {}; While[p < 1000000001, If[p + 30 == x, AppendTo[lst, p]; Print@ p]; {p, q, r, s, t, u, v, w, x} = {q, r, s, t, u, v, w, x, NextPrime@ x}]; lst (* Robert G. Wilson v, Jul 06 2015 *)
Select[Partition[Prime[Range[5 10^6]], 9, 1], #[[1]]+30==#[[9]]&][[;; , 1]] (* The program generates the first 10 terms of the sequence. To generate more, increase the Range constant. *) (* Harvey P. Dale, Jul 01 2024 *)
PROG
(PARI) main(size)=v=vector(size); i=0; m=1; while(i<size, if(prime(m)+30===prime(m+8), v[i++]=prime(m)); m++; ); v \\ Anders Hellström, Jul 08 2015
(Magma) [NthPrime(n): n in [0..2*10^4] | NthPrime(n+8) eq (NthPrime(n) + 30)]; // Vincenzo Librandi, Jul 08 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Tim Johannes Ohrtmann, Apr 16 2015
STATUS
approved