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 A241531 #10 Apr 27 2014 10:13:58 %S A241531 0,0,1,2,1,1,1,2,5,1,2,3,5,1,1,7,5,1,1,1,1,4,5,1,3,1,1,1,1,3,1,3,3,2, %T A241531 3,1,3,5,5,5,7,1,1,2,1,2,3,1,1,2,7,3,1,1,3,3,1,2,1,3,1,7,5,5,2,1,6,5, %U A241531 3,1,3,1,4,1,3,7,5,1,3,1,5,1,7,1,3,13 %N A241531 a(n) = smallest k>=1 such that 2*prime(n) - k^2 is semiprime (or 0 if there is no such k). %e A241531 Let n=22, then 2*prime(22) = 2*79 = 158. We have 158-1=157, 158-4=154, 158-9=149, 158-16=142, and only the last number is semiprime. So a(22)=4. %o A241531 (PARI) a(n) = {k = 1; while ((v = 2*prime(n) - k^2) && (v > 0) && (bigomega(v) != 2), k++); if (v <= 0, 0, k);} \\ _Michel Marcus_, Apr 25 2014 %Y A241531 Cf. A001358. %K A241531 nonn %O A241531 1,4 %A A241531 _Vladimir Shevelev_, Apr 25 2014 %E A241531 More terms from _Michel Marcus_, Apr 25 2014