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.

A179835 Smallest k > 0 such that prime(n-k) + prime(n+k) = 2*prime(n), or 0 if there is no such k.

This page as a plain text file.
%I A179835 #6 Mar 30 2012 17:22:56
%S A179835 0,0,1,0,2,2,2,0,0,3,3,6,3,0,0,1,7,4,8,3,0,0,7,4,6,6,2,2,0,0,6,8,7,12,
%T A179835 0,2,1,0,6,1,2,4,8,15,15,0,1,0,0,0,6,0,0,2,1,1,0,0,6,0,0,0,19,7,0,0,
%U A179835 17,5,29,3,15,15,5,1,5,20,20,4,7,2,21,2,21,4,3,5,4,27,3,0,0,5,28,2,0,0,0,21,0,30
%N A179835 Smallest k > 0 such that prime(n-k) + prime(n+k) = 2*prime(n), or 0 if there is no such k.
%H A179835 T. D. Noe, <a href="/A179835/b179835.txt">Table of n, a(n) for n = 1..10000</a>
%t A179835 nn=1000; p=Prime[Range[2*nn]]; Table[s=Take[p,n-1] + Reverse[Take[p, {n+1,2n-1}]]; pos=Position[s,2*p[[n]]]; If[pos=={}, 0, n-pos[[-1,1]]], {n, nn}]
%Y A179835 Cf. A178609 (largest k), A178670 (number of k)
%K A179835 nonn
%O A179835 1,5
%A A179835 _T. D. Noe_, Jan 10 2011