%I #17 Sep 08 2022 08:46:23
%S 24,72,77,79,87,92,94,124,126,128,132,135,156,158,166,186,192,196,220,
%T 228,241,246,248,270,281,299,304,325,330,334,338,364,370,379,386,393,
%U 400,413,417,421,432,436,454,456,482,488,507,517,519,538,589,594,620,640,661,676,689,691,712,736,750,759
%N Indices of primes followed by a gap (distance to next larger prime) of 8.
%C Indices of the primes given in A031926.
%H Vincenzo Librandi, <a href="/A320702/b320702.txt">Table of n, a(n) for n = 1..10340</a>
%H <a href="/index/Pri#gaps">Index entries for primes, gaps between</a>
%F a(n) = A000720(A031926(n)) = A174349(4,n).
%F A320702 = { i > 0 | prime(i+1) = prime(i) + 8 } = A001223^(-1)({8}).
%p p:= 2: Res:= NULL: count:= 0:
%p for n from 1 while count < 100 do
%p q:= nextprime(p);
%p if q-p = 8 then count:= count+1; Res:= Res, n; fi;
%p p:= q;
%p od:
%p Res; # _Robert Israel_, Oct 19 2018
%t Select[Range[800], Prime[#] + 8 == Prime[# + 1] &] (* _Vincenzo Librandi_, Mar 21 2019 *)
%o (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)}
%o (Magma) [n: n in [1..800] | NthPrime(n+1) - NthPrime(n) eq 8]; // _Vincenzo Librandi_, Mar 21 2019
%Y Equals A000720 o A031926.
%Y Row 4 of A174349.
%Y Indices of 8's in A001223.
%Y Cf. A029707, A029709, A320701, A320703, ..., A320720 (analog for gaps 2, 4, 6, 10, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).
%K nonn
%O 1,1
%A _M. F. Hasler_, Oct 19 2018