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.

A318157 Primes that are one more or one less than the sum of four consecutive composite numbers.

This page as a plain text file.
%I A318157 #28 Jan 02 2019 21:53:54
%S A318157 101,103,107,137,139,197,199,223,227,257,307,347,367,373,379,461,463,
%T A318157 467,479,487,491,499,569,571,577,587,613,617,619,641,643,677,683,701,
%U A318157 733,739,743,751,809,811,821,823,827,829,853,857,859,863,877,881,883,941
%N A318157 Primes that are one more or one less than the sum of four consecutive composite numbers.
%H A318157 Chai Wah Wu, <a href="/A318157/b318157.txt">Table of n, a(n) for n = 1..10000</a>
%e A318157 24 + 25 + 26 + 27 - 1 = 101;
%e A318157 24 + 25 + 26 + 27 + 1 = 103;
%e A318157 25 + 26 + 27 + 28 + 1 = 107.
%e A318157 26 + 27 + 28 + 29 - 1 = 109, but 29 is not composite, so 109 is not in the sequence.
%t A318157 tempList = Table[(Plus@@Range[n, n + 3]) * KroneckerDelta[PrimePi[n - 1], PrimePi[n + 3]], {n, 250}]; Union[Select[tempList - 1, PrimeQ], Select[tempList + 1, PrimeQ]] (* _Alonso del Arte_, Sep 02 2018 *)
%o A318157 (Python)
%o A318157 from sympy import isprime
%o A318157 A318157_list = []
%o A318157 for n in range(2,10**6):
%o A318157     if not (isprime(n) or isprime(n+1) or isprime(n+2) or isprime(n+3)):
%o A318157         if isprime(4*n+5):
%o A318157             A318157_list.append(4*n+5)
%o A318157         if isprime(4*n+7):
%o A318157             A318157_list.append(4*n+7) # _Chai Wah Wu_, Jan 02 2019
%Y A318157 Cf. A296012.
%K A318157 nonn
%O A318157 1,1
%A A318157 _Martin Michael Musatov_, Aug 19 2018
%E A318157 a(16)-a(52) from _Jon E. Schoenfield_, Aug 19 2018