OFFSET
1,1
COMMENTS
Indices of the primes given in A031926.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10340
FORMULA
MAPLE
p:= 2: Res:= NULL: count:= 0:
for n from 1 while count < 100 do
q:= nextprime(p);
if q-p = 8 then count:= count+1; Res:= Res, n; fi;
p:= q;
od:
Res; # Robert Israel, Oct 19 2018
MATHEMATICA
Select[Range[800], Prime[#] + 8 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 21 2019 *)
PROG
(PARI) A_vec(N=100, g=8, p=2, i=primepi(p)-1, L=List())={forprime(q=1+p, , i++; if(p+g==p=q, listput(L, i); N--||break)); Vec(L)}
(Magma) [n: n in [1..800] | NthPrime(n+1) - NthPrime(n) eq 8]; // Vincenzo Librandi, Mar 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Oct 19 2018
STATUS
approved