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.

A305748 Distance of a prime number from the average of the next two consecutive prime numbers.

This page as a plain text file.
%I A305748 #12 Jun 13 2018 06:00:22
%S A305748 2,3,4,5,4,5,4,7,7,5,8,5,4,7,9,7,5,8,5,5,8,7,10,10,5,4,5,4,11,16,7,7,
%T A305748 7,11,5,9,8,7,9,7,7,11,4,5,8,18,14,5,4,7,7,7,13,9,9,7,5,8,5,7,17,16,5,
%U A305748 4,11,17,11,11,4,7,10,11,9,8,7,10,10,8,13,11,7,11,5,8,7,10,10,5,4,10,16,10,8,10,7,12,13
%N A305748 Distance of a prime number from the average of the next two consecutive prime numbers.
%F A305748 a(n) = A024675(n) - A000040(n).
%e A305748 For n=4 prime(4) = 7. The next two primes are 11, 13 and the average (11 + 13) / 2 = 12. So 12 - 7 = 5 and a(4) = 5.
%t A305748 Map[Mean@ Rest@ # - First@ # &, Partition[Prime@ Range@ 99, 3, 1]] (* _Michael De Vlieger_, Jun 11 2018 *)
%o A305748 (PARI) { forprime(n = 2, 100,  p1 = nextprime(n+1); p2 = nextprime(p1 + 1);
%o A305748 print1((p1 + p2) / 2 - n", ")) }
%Y A305748 Cf. A000040, A024675.
%K A305748 nonn,easy
%O A305748 1,1
%A A305748 _Dimitris Valianatos_, Jun 09 2018