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.
%I A177462 #4 Mar 31 2012 12:38:36 %S A177462 1,3,2,3,1,3,4,21,3,9,18,5,9,55,36,5,21,57,30,9,7,21,14,33,49,3,150, %T A177462 39,117,19,12,11,27,17,66,27,21,87,10,75,7,21,14,33,39,45,30,47,3,5, %U A177462 210,49,27,3,30,63,5,21,58,69,5,9,168,153,9,37,204,23,33,41,78,21,123,3,100 %N A177462 Smallest k such that A000125(n)+k and A000125(n)-k are both prime. %e A177462 4+-1->primes. 8+-3->primes. 15+-2->primes. 26+-3->primes,.. %t A177462 g[n_]:=(n+1)*(n^2-n+6)/6; f[n_]:=Block[{k},If[OddQ[n],k=2,k=1];While[ !PrimeQ[n-k]||!PrimeQ[n+k],k+=2];k]; Table[f[g[n]],{n,2,5!}] %Y A177462 Cf. A000125, A078611, A172989, A172990, A177460, A177461 %K A177462 nonn %O A177462 2,2 %A A177462 _Vladimir Joseph Stephan Orlovsky_, May 09 2010 %E A177462 Definition rephrased and offset adapted by _R. J. Mathar_, Aug 15 2010