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.

Showing 1-3 of 3 results.

A167771 Twice-isolated primes: primes p such that neither p+-2 nor p+-4 is prime.

Original entry on oeis.org

2, 53, 89, 157, 173, 211, 251, 257, 263, 293, 331, 337, 359, 367, 373, 389, 409, 449, 479, 509, 541, 547, 557, 563, 577, 587, 593, 607, 631, 653, 683, 691, 701, 709, 719, 727, 733, 751, 787, 797, 839, 919, 929, 947, 953, 977, 983, 991, 997, 1039, 1069, 1103
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 11 2009

Keywords

Comments

2 together with primes p with property that (p-previous prime)>=6 and (next prime-p)>=6.
By the finitude of the generalized Brun constants, this sequence includes almost all primes.

Examples

			a(1)=2 (-2,0,4,6 are nonprimes); a(2)=53 (49,51,55,57 are nonprimes).
		

Crossrefs

Programs

  • Mathematica
    Join[{2},Select[Prime[Range[200]],NoneTrue[#+{4,2,-2,-4},PrimeQ]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 21 2016 *)

Extensions

Comment from Charles R Greathouse IV, Nov 12 2009

A160058 Primes whose distance to both nearest neighbor primes is not of the form 2^k.

Original entry on oeis.org

53, 157, 173, 211, 251, 257, 263, 293, 331, 337, 373, 509, 541, 547, 557, 563, 577, 587, 593, 607, 631, 653, 733, 787, 797, 839, 947, 953, 977, 997, 1039, 1069, 1103, 1123, 1129, 1181, 1187, 1223, 1237, 1249, 1259, 1327, 1361, 1367, 1399, 1409, 1459, 1471
Offset: 1

Views

Author

Jonathan Vos Post, May 01 2009

Keywords

Comments

Intersection with A061771 yields an empty set. - R. J. Mathar, May 21 2009

Crossrefs

Cf. A000040. This is a proper subsequence of A137869.

Programs

  • Maple
    isA000079 := proc(n) if nops(numtheory[factorset](n)) > 1 then false; elif n mod 2 <> 0 then false; else true; fi; end: isA160058 := proc(p) o := prevprime(p) ; q := nextprime(p) ; if isprime(p) and not isA000079(q-p) and not isA000079(p-o) then true; else false; fi; end: for n from 2 to 1000 do p := ithprime(n) ; if isA160058(p) then printf("%d,",p) ; fi; od: # R. J. Mathar, May 21 2009
  • Mathematica
    n2kQ[n_]:=Module[{d=Differences[n]},!IntegerQ[Log[2,First[d]]] && !IntegerQ[ Log[ 2,Last[d]]]]; Transpose[Select[Partition[Prime[ Range[ 300]],3,1],n2kQ]][[2]] (* Harvey P. Dale, Mar 05 2014 *)
  • PARI
    t=0;p=2;forprime(q=3,999, t*(t=q-p-1<
    				

Extensions

More terms from M. F. Hasler, May 02 2008
Edited by N. J. A. Sloane, May 02 2009, based on comments from M. F. Hasler
More terms from R. J. Mathar, May 21 2009

A167773 Primes p with property that (p-previous prime) < 6 or (next prime-p) < 6.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 59, 61, 67, 71, 73, 79, 83, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 163, 167, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 241, 269, 271, 277, 281, 283, 307, 311, 313, 317, 347
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 11 2009

Keywords

Crossrefs

These are the primes not in A137869.
Cf. A053070.

Programs

  • Mathematica
    Join[{2},Select[Partition[Prime[Range[100]],3,1],#[[2]]-#[[1]]<6||#[[3]]-#[[2]]<6&][[;;,2]]] (* Harvey P. Dale, Oct 29 2023 *)

Extensions

Corrected (43 inserted) by R. J. Mathar, May 30 2010
Definition corrected to match data. - Harvey P. Dale_, Oct 29 2023
Showing 1-3 of 3 results.