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.

A275681 Table read by rows: list of sexy prime triples (p, p+6, p+12) such that p+18 is composite.

Original entry on oeis.org

7, 13, 19, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 73, 79, 97, 103, 109, 101, 107, 113, 151, 157, 163, 167, 173, 179, 227, 233, 239, 257, 263, 269, 271, 277, 283, 347, 353, 359, 367, 373, 379, 557, 563, 569, 587, 593, 599, 607, 613, 619, 647, 653, 659, 727, 733, 739
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 05 2016

Keywords

Examples

			The table starts:
7, 13, 19;
17, 23, 29;
31, 37, 43;
...
		

Crossrefs

Cf. A023201 (sexy primes), A046118, A123082, A275682.

Programs

  • Magma
    lst:=[]; for p in PrimesUpTo(727) do b:=p+6; if IsPrime(b) then c:=b+6; if IsPrime(c) and not IsPrime(c+6) then lst:=lst cat [p, b, c]; end if; end if; end for; lst;
  • Maple
    N:= 10^4: # to get all entries <= N
    Primes:= select(isprime,{seq(i,i=1..N+18,2)}):
    S:= select(`<=`, Primes,N) intersect map(t -> t-6, Primes) intersect map(t -> t-12, Primes) minus map(t -> t-18, Primes):
    map(t ->(t,t+6,t+12), sort(convert(S,list))); # Robert Israel, Aug 05 2016
  • Mathematica
    Most[#]&/@Select[Table[n+{0,6,12,18},{n,Prime[Range[200]]}],PrimeQ[#] == {True,True,True,False}&]//Flatten (* Harvey P. Dale, Jan 19 2017 *)

Formula

a(3*n-2) = A046118(n).
a(3*n-1) = A046118(n)+6.
a(3*n) = A046118(n)+12.