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 A163850 #6 Oct 16 2016 16:39:23 %S A163850 3,127,24391,29789,328511,2460373,3048623,9393929,10503461 %N A163850 Primes p such that their distance to the nearest cube above p and also their distance to the nearest cube below p are prime. %C A163850 The two sequences A048763(p) and A048762(p), p=A000040(n), define %C A163850 nearest cubes above and below each prime p. If p is in A146318, the %C A163850 distance to the larger cube, A048763(p)-p, is prime. If p is %C A163850 in the set {3, 11, 13, 19, 29, 67,...,107, 127, 223,..}, the distance to the lower %C A163850 cube is prime. If both of these distances are prime, we insert p into the sequence. %e A163850 p=3 is in the sequence because the distance p-1=2 to the cube 1^3 below 3, and also the distance 8-p=5 to the cube 8=2^3 above p are prime. %e A163850 p=127 is in the sequence because the distance p-125=2 to the cube 125=5^3 below p, and also the distance 216-p=89 to the cube 216=6^3 above p, are prime. %t A163850 Clear[f,lst,p,n]; f[n_]:=IntegerPart[n^(1/3)]; lst={};Do[p=Prime[n];If[PrimeQ[p-f[p]^3]&&PrimeQ[(f[p]+1)^3-p],AppendTo[lst,p]],{n,9!}];lst %t A163850 dncQ[n_]:=Module[{c=Floor[Surd[n,3]]},AllTrue[{n-c^3,(c+1)^3-n},PrimeQ]]; Select[Prime[Range[230000]],dncQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Oct 16 2016 *) %Y A163850 Cf. A163848 %K A163850 nonn %O A163850 1,1 %A A163850 _Vladimir Joseph Stephan Orlovsky_, Aug 05 2009 %E A163850 Edited, first 5 entries checked by _R. J. Mathar_, Aug 12 2009 %E A163850 Two more terms (a(8) and a(9)) from _Harvey P. Dale_, Oct 16 2016