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.

This page as a plain text file.
%I A296012 #26 Jan 26 2018 08:32:21
%S A296012 79,101,103,149,151,167,191,193,227,229,257,277,281,283,347,349,353,
%T A296012 359,367,373,401,431,433,439,461,463,479,509,557,563,607,613,617,619,
%U A296012 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
%N A296012 Primes of the form k + k+1 + k+2 +-1 where k, k+1, and k+2 are all composite numbers.
%C A296012 Primes p such that floor((p-2)/3) and floor((p-2)/3)+2 are composite. - _Robert Israel_, Dec 03 2017
%H A296012 Chai Wah Wu, <a href="/A296012/b296012.txt">Table of n, a(n) for n = 1..10000</a>
%e A296012 25 + 26 + 27 + 1 = 79,
%e A296012 33 + 34 + 35 - 1 = 101,
%e A296012 33 + 34 + 35 + 1 = 103, etc.
%p A296012 filter:= proc(n) local k;
%p A296012   if not isprime(n) then return false fi;
%p A296012   k:= floor((n-2)/3);
%p A296012   not isprime(k) and not isprime(k+1) and not isprime(k+2)
%p A296012 end proc:
%p A296012 select(filter, [seq(i,i=5..2000, 2)]); # _Robert Israel_, Dec 03 2017
%t A296012 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 *)
%o A296012 (Python)
%o A296012 from __future__ import division
%o A296012 from sympy import nextprime, isprime
%o A296012 A296012_list, p = [], 2
%o A296012 while len(A296012_list) < 10000:
%o A296012     k = (p-2)//3
%o A296012     if not (isprime(k) or isprime(k+2)):
%o A296012         A296012_list.append(p)
%o A296012     p = nextprime(p) # _Chai Wah Wu_, Jan 24 2018
%Y A296012 Cf. A000045, A136799.
%K A296012 nonn
%O A296012 1,1
%A A296012 _Martin Michael Musatov_, Dec 02 2017