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.

A189571 Smallest of nine consecutive primes whose sum is a prime.

This page as a plain text file.
%I A189571 #20 Sep 08 2022 08:45:56
%S A189571 3,29,31,37,47,79,83,89,107,109,127,131,139,149,157,173,179,193,197,
%T A189571 199,211,241,277,347,359,367,373,389,397,433,449,487,491,521,577,593,
%U A189571 619,643,659,677,743,761,829,853,953,977,1049,1063,1087,1129,1151,1193
%N A189571 Smallest of nine consecutive primes whose sum is a prime.
%C A189571 First 7-tuple of consecutive primes belonging to the sequence: 118061, 118081, 118093, 118127, 118147, 118163, 118169. Twin primes in the sequence: 29, 31; 107, 109; 197, 199; 1427, 1429; 1607, 1609; 1721, 1723; 4019, 4021, etc. [_Bruno Berselli_, Aug 26 2013]
%H A189571 Bruno Berselli, <a href="/A189571/b189571.txt">Table of n, a(n) for n = 1..1000</a>
%e A189571 47 is in the sequence because 47+53+59+61+67+71+73+79+83 = 593 and 593 is prime.
%t A189571 Transpose[Select[Partition[Prime[Range[500]],9,1],PrimeQ[Total[#]]&]] [[1]] (* _Harvey P. Dale_, Jun 05 2013 *)
%o A189571 (Magma) [ NthPrime(n): n in [1..190] | IsPrime(&+[NthPrime(n+s): s in [0..8]]) ];
%o A189571 (Python)
%o A189571 from sympy import isprime, nextprime
%o A189571 def aupto(limit):
%o A189571   plst, alst = [3, 5, 7, 11, 13, 17, 19, 23, 29], []
%o A189571   while plst[0] <= limit:
%o A189571     if isprime(sum(plst)): alst.append(plst[0])
%o A189571     plst = plst[1:] + [nextprime(plst[-1])]
%o A189571   return alst
%o A189571 print(aupto(1200)) # _Michael S. Branicky_, Mar 29 2021
%Y A189571 Cf. A073681, A152468, A180948, A180950, A226380.
%K A189571 nonn
%O A189571 1,1
%A A189571 _Bruno Berselli_, Apr 23 2011
%E A189571 Additional cross reference from _Harvey P. Dale_, Jun 05 2013