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.

A296012 Primes of the form k + k+1 + k+2 +-1 where k, k+1, and k+2 are all composite numbers.

Original entry on oeis.org

79, 101, 103, 149, 151, 167, 191, 193, 227, 229, 257, 277, 281, 283, 347, 349, 353, 359, 367, 373, 401, 431, 433, 439, 461, 463, 479, 509, 557, 563, 607, 613, 617, 619, 641, 643, 647, 653, 659, 661, 709, 733, 739, 743, 761, 797, 821, 823, 857, 859, 863, 887, 907, 911, 967, 971, 977, 983, 1019, 1021
Offset: 1

Views

Author

Martin Michael Musatov, Dec 02 2017

Keywords

Comments

Primes p such that floor((p-2)/3) and floor((p-2)/3)+2 are composite. - Robert Israel, Dec 03 2017

Examples

			25 + 26 + 27 + 1 = 79,
33 + 34 + 35 - 1 = 101,
33 + 34 + 35 + 1 = 103, etc.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local k;
      if not isprime(n) then return false fi;
      k:= floor((n-2)/3);
      not isprime(k) and not isprime(k+1) and not isprime(k+2)
    end proc:
    select(filter, [seq(i,i=5..2000, 2)]); # Robert Israel, Dec 03 2017
  • Mathematica
    Select[Join @@ Map[{{Total@ # - 1, #}, {Total@ # + 1, #}} &, Partition[Range@ 350, 3, 1]], And[PrimeQ@ First@ #, AllTrue[Last@ #, CompositeQ]] &][[All, 1]] (* Michael De Vlieger, Dec 03 2017 *)
  • Python
    from _future_ import division
    from sympy import nextprime, isprime
    A296012_list, p = [], 2
    while len(A296012_list) < 10000:
        k = (p-2)//3
        if not (isprime(k) or isprime(k+2)):
            A296012_list.append(p)
        p = nextprime(p) # Chai Wah Wu, Jan 24 2018