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.

A063934 Numbers which are either prime or the average of consecutive odd primes.

This page as a plain text file.
%I A063934 #20 Oct 31 2020 17:30:47
%S A063934 2,3,4,5,6,7,9,11,12,13,15,17,18,19,21,23,26,29,30,31,34,37,39,41,42,
%T A063934 43,45,47,50,53,56,59,60,61,64,67,69,71,72,73,76,79,81,83,86,89,93,97,
%U A063934 99,101,102,103,105,107,108,109,111,113,120,127,129,131,134,137,138
%N A063934 Numbers which are either prime or the average of consecutive odd primes.
%C A063934 Numbers n such that nextprime(n-1) + prevprime(n+1) = 2n. - _Wesley Ivan Hurt_, May 13 2017
%H A063934 Harry J. Smith, <a href="/A063934/b063934.txt">Table of n, a(n) for n = 1..1000</a>
%F A063934 For n >= 1: a(2n)=A000040(n+1); a(2n+1)=(A000040(n+1)+A000040(n+2))/2 =A024675(n).
%e A063934 7 is prime, 9 is the average of 7 and 11, 11 is prime, 12 is the average of 11 and 13; so 7, 9, 11 and 13 are in the sequence.
%t A063934 Function[p, Union@ Join[p, Rest@ Map[Mean, Partition[p, 2, 1]]]]@ Prime@ Range@ 34 (* _Michael De Vlieger_, May 13 2017 *)
%o A063934 (PARI) { for (n=1, 1000, if (n==1, a=2; p=3, if (n%2, a=(q + p=nextprime(q + 1))/2, a=q=p)); write("b063934.txt", n, " ", a) ) } \\ _Harry J. Smith_, Sep 03 2009
%Y A063934 Cf. A063932, A063933.
%K A063934 nonn
%O A063934 1,1
%A A063934 _Henry Bottomley_, Aug 21 2001