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.

This page as a plain text file.
%I A098059 #26 Jan 26 2023 15:28:42
%S A098059 7,13,19,37,43,67,79,89,97,103,109,127,163,193,199,211,223,229,277,
%T A098059 307,313,349,359,379,389,397,401,439,449,457,463,467,479,487,491,499,
%U A098059 509,613,619,643,661,673,683,701,719,739,743,757,761,769,797,823,853,859
%N A098059 Primes preceding gaps divisible by 4.
%C A098059 Prime complement of A098058. - _Robert G. Wilson v_, Jul 17 2015
%H A098059 Robert Israel, <a href="/A098059/b098059.txt">Table of n, a(n) for n = 1..10000</a>
%F A098059 a(n) ~ 2n log n. - _Charles R Greathouse IV_, Jun 29 2015
%e A098059 7 is a term since the next prime after 7 is 11 and 11-7 is divisible by 4.
%p A098059 N:= 1000:  # to get all terms up to the second-last prime <= N
%p A098059 Primes:= select(isprime,[2, 2*i+1 $ i=1..floor((N-1)/2)]):
%p A098059 Gaps:= Primes[2..-1] - Primes[1..-2]:
%p A098059 Primes[select(t-> Gaps[t] mod 4 = 0, [$1..nops(Gaps)])]; # _Robert Israel_, Jun 24 2015
%t A098059 Prime[Select[Range[150], Mod[Prime[ # + 1] - Prime[ # ], 4] == 0 &]] (* _Ray Chandler_, Oct 26 2006 *)
%t A098059 Transpose[Select[Partition[Prime[Range[200]],2,1],Divisible[Last[#]- First[#], 4]&]][[1]] (* _Harvey P. Dale_, Apr 06 2013 *)
%o A098059 (PARI) f(n) = for(x=1,n,z=(prime(x+1)-prime(x));if(z%4==0,print1(prime(x)",")))
%o A098059 (PARI) p=2; forprime(q=3,1e4, if((q-p)%4==0, print1(p", ")); p=q) \\ _Charles R Greathouse IV_, Jun 29 2015
%Y A098059 Subsequence of A152087.
%Y A098059 Cf. A001223, A098058.
%K A098059 easy,nonn
%O A098059 1,1
%A A098059 _Cino Hilliard_, Sep 11 2004
%E A098059 Edited by _Ray Chandler_, Oct 26 2006
%E A098059 New name from _Robert Israel_ and _Charles R Greathouse IV_, Jun 29 2015