cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A320702 Indices of primes followed by a gap (distance to next larger prime) of 8.

Original entry on oeis.org

24, 72, 77, 79, 87, 92, 94, 124, 126, 128, 132, 135, 156, 158, 166, 186, 192, 196, 220, 228, 241, 246, 248, 270, 281, 299, 304, 325, 330, 334, 338, 364, 370, 379, 386, 393, 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
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes given in A031926.

Crossrefs

Equals A000720 o A031926.
Row 4 of A174349.
Indices of 8's in A001223.
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).

Programs

  • Magma
    [n: n in [1..800] | NthPrime(n+1) - NthPrime(n) eq 8]; // Vincenzo Librandi, Mar 21 2019
  • 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 *)
  • 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)}
    

Formula

a(n) = A000720(A031926(n)) = A174349(4,n).
A320702 = { i > 0 | prime(i+1) = prime(i) + 8 } = A001223^(-1)({8}).