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.

A098059 Primes preceding gaps divisible by 4.

Original entry on oeis.org

7, 13, 19, 37, 43, 67, 79, 89, 97, 103, 109, 127, 163, 193, 199, 211, 223, 229, 277, 307, 313, 349, 359, 379, 389, 397, 401, 439, 449, 457, 463, 467, 479, 487, 491, 499, 509, 613, 619, 643, 661, 673, 683, 701, 719, 739, 743, 757, 761, 769, 797, 823, 853, 859
Offset: 1

Views

Author

Cino Hilliard, Sep 11 2004

Keywords

Comments

Prime complement of A098058. - Robert G. Wilson v, Jul 17 2015

Examples

			7 is a term since the next prime after 7 is 11 and 11-7 is divisible by 4.
		

Crossrefs

Subsequence of A152087.

Programs

  • Maple
    N:= 1000:  # to get all terms up to the second-last prime <= N
    Primes:= select(isprime,[2, 2*i+1 $ i=1..floor((N-1)/2)]):
    Gaps:= Primes[2..-1] - Primes[1..-2]:
    Primes[select(t-> Gaps[t] mod 4 = 0, [$1..nops(Gaps)])]; # Robert Israel, Jun 24 2015
  • Mathematica
    Prime[Select[Range[150], Mod[Prime[ # + 1] - Prime[ # ], 4] == 0 &]] (* Ray Chandler, Oct 26 2006 *)
    Transpose[Select[Partition[Prime[Range[200]],2,1],Divisible[Last[#]- First[#], 4]&]][[1]] (* Harvey P. Dale, Apr 06 2013 *)
  • PARI
    f(n) = for(x=1,n,z=(prime(x+1)-prime(x));if(z%4==0,print1(prime(x)",")))
    
  • PARI
    p=2; forprime(q=3,1e4, if((q-p)%4==0, print1(p", ")); p=q) \\ Charles R Greathouse IV, Jun 29 2015

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Jun 29 2015

Extensions

Edited by Ray Chandler, Oct 26 2006
New name from Robert Israel and Charles R Greathouse IV, Jun 29 2015