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.

A264722 Composite numbers that are less than the average of their closest flanking primes.

This page as a plain text file.
%I A264722 #15 Jul 28 2020 17:53:37
%S A264722 8,14,20,24,25,32,33,38,44,48,49,54,55,62,63,68,74,75,80,84,85,90,91,
%T A264722 92,98,104,110,114,115,116,117,118,119,128,132,133,140,141,142,143,
%U A264722 152,153,158,159,164,168,169,174,175,182,183,184,185,194,200,201,202,203
%N A264722 Composite numbers that are less than the average of their closest flanking primes.
%C A264722 Composite numbers that are nearer to the immediately previous prime than to the immediately next prime.
%C A264722 Members of this sequence are the numbers C, necessarily composite, such that P_n < C < I_n, where P_n is the n-th odd prime and I_n the interprime (A024675) between P_n and P_n+1.
%C A264722 Prime-free subsequence of A264720.
%H A264722 Chris Boyd, <a href="/A264722/b264722.txt">Table of n, a(n) for n = 1..10000</a>
%e A264722 a(7) = 33 because 33 < (31 + 37)/2 = 34.
%t A264722 Select[Range@ 204, And[CompositeQ@ #, # < (NextPrime[#, -1] + NextPrime@ #)/2] &] (* _Michael De Vlieger_, Nov 22 2015 *)
%t A264722 Range[#[[1]]+1,Total[#]/2 -1]&/@Select[Partition[Prime[Range[50]],2,1], #[[2]]- #[[1]]>2&]//Flatten  (* _Harvey P. Dale_, Jul 28 2020 *)
%o A264722 (PARI) test(n)= {if(n-precprime(n-1)<nextprime(n+1)-n&&n>2&&!isprime(n),return(1),return(0))}
%o A264722 for(i=1,200,if(test(i),print1(i,", ")))
%Y A264722 Cf. A264719, A264720, A264721.
%K A264722 nonn,easy
%O A264722 1,1
%A A264722 _Chris Boyd_, Nov 21 2015