OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
24 + 25 + 26 + 27 - 1 = 101;
24 + 25 + 26 + 27 + 1 = 103;
25 + 26 + 27 + 28 + 1 = 107.
26 + 27 + 28 + 29 - 1 = 109, but 29 is not composite, so 109 is not in the sequence.
MATHEMATICA
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 *)
PROG
(Python)
from sympy import isprime
A318157_list = []
for n in range(2, 10**6):
if not (isprime(n) or isprime(n+1) or isprime(n+2) or isprime(n+3)):
if isprime(4*n+5):
A318157_list.append(4*n+5)
if isprime(4*n+7):
A318157_list.append(4*n+7) # Chai Wah Wu, Jan 02 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Michael Musatov, Aug 19 2018
EXTENSIONS
a(16)-a(52) from Jon E. Schoenfield, Aug 19 2018
STATUS
approved