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.

A166574 If p, q are successive primes, and there is a number k with p < k <= q such that r = p+k is a prime, then r is in the sequence.

This page as a plain text file.
%I A166574 #23 Jul 02 2024 13:31:31
%S A166574 5,7,11,17,23,29,41,47,59,67,83,89,97,107,109,127,137,149,151,167,179,
%T A166574 181,197,227,229,233,239,257,263,281,283,307,317,337,347,349,359,367,
%U A166574 383,389,401,409,431,433,449,461,467,479,487,491
%N A166574 If p, q are successive primes, and there is a number k with p < k <= q such that r = p+k is a prime, then r is in the sequence.
%C A166574 The old definition was: Primes p>=5 with the property: if Prime(k)<p/2<Prime(k+1), then p<=Prime(k)+ Prime(k+1)
%C A166574 If A(x) is the counting function of a(n) not exceeding x, then, in view of the symmetry, it is natural to conjecture that A(x)~pi(x)/2.
%H A166574 Harvey P. Dale, <a href="/A166574/b166574.txt">Table of n, a(n) for n = 1..1000</a>
%e A166574 Taking p=2, q=3, k=3 we get r=2+3=5, the first term.
%e A166574 Taking p=3, q=5, k=4 we get r=3+4=7, the second term.
%e A166574 From p=89, q=97 we can take both k=90 and k=92, getting the terms 89+90=179 and 89+92=181. - _Art Baker_, Mar 16 2019
%t A166574 Reap[Do[p=Prime[n]; k=PrimePi[p/2]; If[p<=Prime[k]+Prime[k+1], Sow[p]], {n,3,PrimePi[1000]}]][[2,1]]
%t A166574 Select[#[[1]]+Range[#[[1]]+1,#[[2]]],PrimeQ]&/@Partition[Prime[Range[60]],2,1]//Flatten (* _Harvey P. Dale_, Jul 02 2024 *)
%Y A166574 Cf. A182365, A166307, A166252, A166251, A164368, A104272, A080359, A164333, A164288, A164294, A164554
%K A166574 nonn
%O A166574 1,1
%A A166574 _Vladimir Shevelev_, Oct 17 2009
%E A166574 Extended by _T. D. Noe_, Dec 01 2010
%E A166574 Edited with simpler definition based on a suggestion from _Art Baker_. -_N. J. A. Sloane_, Mar 16 2019