login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A318157 Primes that are one more or one less than the sum of four consecutive composite numbers. 1

%I

%S 101,103,107,137,139,197,199,223,227,257,307,347,367,373,379,461,463,

%T 467,479,487,491,499,569,571,577,587,613,617,619,641,643,677,683,701,

%U 733,739,743,751,809,811,821,823,827,829,853,857,859,863,877,881,883,941

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

%H Chai Wah Wu, <a href="/A318157/b318157.txt">Table of n, a(n) for n = 1..10000</a>

%e 24 + 25 + 26 + 27 - 1 = 101;

%e 24 + 25 + 26 + 27 + 1 = 103;

%e 25 + 26 + 27 + 28 + 1 = 107.

%e 26 + 27 + 28 + 29 - 1 = 109, but 29 is not composite, so 109 is not in the sequence.

%t 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 (Python)

%o from sympy import isprime

%o A318157_list = []

%o for n in range(2,10**6):

%o if not (isprime(n) or isprime(n+1) or isprime(n+2) or isprime(n+3)):

%o if isprime(4*n+5):

%o A318157_list.append(4*n+5)

%o if isprime(4*n+7):

%o A318157_list.append(4*n+7) # _Chai Wah Wu_, Jan 02 2019

%Y Cf. A296012.

%K nonn

%O 1,1

%A _Martin Michael Musatov_, Aug 19 2018

%E a(16)-a(52) from _Jon E. Schoenfield_, Aug 19 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 1 04:06 EDT 2020. Contains 337441 sequences. (Running on oeis4.)