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.

A264720 Numbers that are less than the average of their closest flanking primes.

This page as a plain text file.
%I A264720 #10 Nov 25 2015 20:52:47
%S A264720 3,7,8,13,14,19,20,23,24,25,31,32,33,38,43,44,47,48,49,54,55,61,62,63,
%T A264720 68,73,74,75,80,83,84,85,89,90,91,92,98,103,104,109,110,113,114,115,
%U A264720 116,117,118,119,128,131,132,133,139,140,141,142,143,151,152,153,158
%N A264720 Numbers that are less than the average of their closest flanking primes.
%C A264720 Numbers that are nearer to the immediately previous prime than to the immediately next prime.
%C A264720 This sequence may be viewed as a generalization of A051635 (the weak primes) that includes qualifying composite numbers.
%C A264720 The union of this sequence with A264719 & A145025 is A000027 (omitting 1 & 2).
%H A264720 Chris Boyd, <a href="/A264720/b264720.txt">Table of n, a(n) for n = 1..10000</a>
%e A264720 a(11) = 31 because 31 < (29 + 37)/2 = 33.
%e A264720 a(12) = 32 because 32 < (31 + 37)/2 = 34.
%t A264720 Select[Range@ 162, # < (NextPrime[#, -1] + NextPrime@ #)/2 &] (* _Michael De Vlieger_, Nov 22 2015 *)
%o A264720 (PARI) test(n)= {if(n-precprime(n-1)<nextprime(n+1)-n&&n>2,return(1),return(0))}
%o A264720 for(i=1,200,if(test(i),print1(i,", ")))
%Y A264720 Cf. A051634, A145025, A264719, A264721, A264722.
%K A264720 nonn,easy
%O A264720 1,1
%A A264720 _Chris Boyd_, Nov 21 2015