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.

A124661 Primes prime(n) such that prime(n-k)+prime(n+k) >= 2*prime(n) for k = 1..n-2.

This page as a plain text file.
%I A124661 #47 Jul 01 2025 13:37:51
%S A124661 2,3,5,7,13,19,23,31,43,47,73,83,109,113,181,199,283,293,313,317,463,
%T A124661 467,503,509,523,619,661,683,691,887,1063,1069,1103,1109,1123,1129,
%U A124661 1303,1307,1321,1327,1613,1621,1627,1637,1669,1789
%N A124661 Primes prime(n) such that prime(n-k)+prime(n+k) >= 2*prime(n) for k = 1..n-2.
%C A124661 The first two primes, 2 and 3, are tested against an empty set of k, and we include them, defining such a test to have a positive outcome.
%C A124661 McNew's "popular primes" sequence (A385503) has the same first 14 terms, differing first by excluding 181. McNew says that a prime p is "popular" on an interval [2, k] if no prime occurs more frequently than p as the greatest prime factor (gpf, A006530) of the integers in that interval. - _N. J. A. Sloane_, Jul 25 2017 and _Peter Munn_, Jul 01 2025
%C A124661 See the Pomerance link for a proof that the sequence is infinite. - _Peter Munn_, Jul 01 2025
%H A124661 Chai Wah Wu, <a href="/A124661/b124661.txt">Table of n, a(n) for n = 1..10000</a>
%H A124661 Nathan McNew, <a href="http://arxiv.org/abs/1504.05985">Popular values of the largest prime divisor function</a>, arXiv:1504.05985 [math.NT], 2015.
%H A124661 Nathan McNew, <a href="https://doi.org/10.1080/10586458.2016.1155188">The Most Frequent Values of the Largest Prime Divisor Function</a>, Exper. Math., 2017, Vol. 26, No. 2, 210-224.
%H A124661 C. Pomerance, <a href="http://dx.doi.org/10.1090/S0025-5718-1979-0514836-7">The prime number graph</a>, Math. Comp. 33 (1979) 399--408. - _Nathan McNew_, Apr 04 2014
%e A124661 prime(11)=31 is in the sequence because prime(10)+prime(12) = 66, prime(9)+prime(13) = 64,..., prime(2)+prime(20) = 74 are all >= 62 = 2*31.
%e A124661 prime(10) = 29 is not in the sequence because prime(9)+prime(11) = 54 for example is smaller than 58 = 2*29.
%t A124661 Select[Prime@ Range@ 300, Function[{p, n}, NoneTrue[Range[n - 2], Prime[n - #] + Prime[n + #] < 2 p &]] @@ {#, PrimePi@ #} &] (* _Michael De Vlieger_, Jul 25 2017 *)
%o A124661 (PARI) isok(p) = {n = primepi(p); for (k=1, n-2, if (prime(n-k) + prime(n+k) < 2*p, return (0));); return (1);}
%o A124661 lista(nn) = {for(n=1, nn, if (isok(prime(n)), print1(prime(n), ", ");););} \\ _Michel Marcus_, Nov 03 2013
%o A124661 (Python)
%o A124661 from sympy import prime
%o A124661 A124661_list = []
%o A124661 for n in range(1,10**6):
%o A124661     p = prime(n)
%o A124661     for k in range(1,n-1):
%o A124661         if prime(n-k)+prime(n+k) < 2*p:
%o A124661             break
%o A124661     else:
%o A124661         A124661_list.append(p) # _Chai Wah Wu_, Jul 25 2017
%Y A124661 Cf. A006530, A051635, A385503.
%K A124661 nonn,easy
%O A124661 1,1
%A A124661 _Artur Jasinski_, Dec 23 2006
%E A124661 Sequence extended by _R. J. Mathar_, Mar 28 2010
%E A124661 Edited, restoring previous name, by _Peter Munn_, Jul 01 2025