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.

A071680 Primes that are the arithmetic mean of their prime predecessor and another prime.

This page as a plain text file.
%I A071680 #24 Dec 02 2015 03:55:13
%S A071680 5,37,53,67,157,173,211,257,263,277,373,479,563,593,607,613,631,653,
%T A071680 733,809,947,977,1009,1103,1123,1187,1223,1297,1367,1471,1511,1607,
%U A071680 1663,1721,1747,1753,1783,1867,1901,1907,1931,1993,2137,2287,2377,2411,2417
%N A071680 Primes that are the arithmetic mean of their prime predecessor and another prime.
%C A071680 prime(n) where 2*prime(n) - prime(n-1) is prime. - _Robert Israel_, Dec 01 2015
%H A071680 Robert Israel, <a href="/A071680/b071680.txt">Table of n, a(n) for n = 1..11000</a>
%e A071680 A000040(12) = 37, A000040(12-1) = 31, 37 = (31 + 43)/2, therefore 37 is a term.
%p A071680 Primes:= select(isprime, [2,seq(i,i=1..10^4,2)]):
%p A071680 Primes[select(i -> isprime(2*Primes[i]-Primes[i-1]), [$2..nops(Primes)])]; # _Robert Israel_, Dec 01 2015
%t A071680 p = q = 2; lst = {}; Do[q = Prime@n; If[PrimeQ[2q - p], AppendTo[lst, q]]; p = q, {n, 2, 400}]; lst (* _Robert G. Wilson v_, Mar 22 2007 *)
%o A071680 (PARI) lista(nn) = {forprime(p=5, nn, if (isprime(2*p-precprime(p-1)), print1(p, ", ")););} \\ _Michel Marcus_, Dec 01 2015
%Y A071680 Cf. A071681, A006562 is a subsequence.
%K A071680 nonn
%O A071680 1,1
%A A071680 _Reinhard Zumkeller_, May 31 2002; revised Jul 16 2003
%E A071680 Thanks to _Sven Simon_ for noticing errors in the original version.