This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A124661 Popular primes: primes prime(n) such that prime(n-k)+prime(n+k) >= 2*prime(n) for all k = 1,2,...n-2. 8
 2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 73, 83, 109, 113, 181, 199, 283, 293, 313, 317, 463, 467, 503, 509, 523, 619, 661, 683, 691, 887, 1063, 1069, 1103, 1109, 1123, 1129, 1303, 1307, 1321, 1327, 1613, 1621, 1627, 1637, 1669, 1789 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS 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 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. LINKS Chai Wah Wu, Table of n, a(n) for n = 1..10000 Nathan McNew, Popular values of the largest prime divisor function, arXiv:1504.05985 [math.NT], 2015. Nathan McNew, The Most Frequent Values of the Largest Prime Divisor Function, Exper. Math., 2017, Vol. 26, No. 2, 210-224. C. Pomerance, The prime number graph, Math. Comp. 33 (1979) 399--408. - Nathan McNew, Apr 04 2014 EXAMPLE 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. prime(10) = 29 is not in the sequence because prime(9)+prime(11) = 54 for example is smaller than 58 = 2*29. MATHEMATICA Select[Prime@ Range@ 300, Function[{p, n}, NoneTrue[Range[n - 2], Prime[n - #] + Prime[n + #] < 2 p &]] @@ {#, PrimePi@ #} &] (* Michael De Vlieger, Jul 25 2017 *) PROG (PARI) isok(p) = {n = primepi(p); for (k=1, n-2, if (prime(n-k) + prime(n+k) < 2*p, return (0)); ); return (1); } lista(nn) = {for(n=1, nn, if (isok(prime(n)), print1(prime(n), ", "); ); ); } \\ Michel Marcus, Nov 03 2013 (Python) def a124661(end): ....a124661_list=[2, 3, 5, 7] ....primes=[2, 3] ....add=True ....for num in range(4, end*3): ........prime=False ........length=len(primes) ........for y in range(0, length): ............if num % primes[y]!=0: ................prime=True ............else: ................prime=False ................break ........if (prime): ............primes.append(num) ....for x in range(4, int(len(primes)/2)): ........for k in range(1, x-2): ............if (primes[x-k]+primes[x+k]>=primes[x]*2): ................add=True ............else: ................add=False ................break ........if (add): ............if (primes[x]>end): ................break ............else: ................a124661_list.append(primes[x]) ....return a124661_list # Conner L. Delahanty, Apr 19 2014 (Python) from sympy import prime A124661_list = [] for n in range(1, 10**6):     p = prime(n)     for k in range(1, n-1):         if prime(n-k)+prime(n+k) < 2*p:             break     else:         A124661_list.append(p) # Chai Wah Wu, Jul 25 2017 CROSSREFS Cf. A006530, A051635. Sequence in context: A118371 A153591 A038917 * A319126 A134266 A233043 Adjacent sequences:  A124658 A124659 A124660 * A124662 A124663 A124664 KEYWORD nonn,easy AUTHOR Artur Jasinski, Dec 23 2006 EXTENSIONS Sequence extended by R. J. Mathar, Mar 28 2010 STATUS approved

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.

Last modified December 14 05:17 EST 2018. Contains 318090 sequences. (Running on oeis4.)