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 A133518 #12 Sep 08 2022 08:45:32 %S A133518 3,2,2,4,30,6,6,4,30,2,12,18,6,24,14,14,12,10,16,2,6,4,2,14,54,6,4,18, %T A133518 4,2,30,26,56,10,24,12,24,10,30,2,18,6,26,24,14,28,18,10,14,10,12,24, %U A133518 16,6,18,2,20,6,4,12,4,6,10,2,6,14,16,4,18,10,14,14,16,24,4,12,32,16,50,12,2 %N A133518 Smallest k such that p(n)^3 + k is prime where p(n) is the n-th prime. %H A133518 Bruno Berselli, <a href="/A133518/b133518.txt">Table of n, a(n) for n = 1..1000</a> %e A133518 p(1)=2, 2^3 = 8. for even k, 2^r + k is even and thus not prime, so we only need consider odd k. %e A133518 for k = 1: 8 + 1 = 9, which is 3^2 and not prime. %e A133518 for k = 3: 8 + 3 = 11, which is prime, so 3 is the smallest number that can be added to 8 to make a new prime. %e A133518 Hence a(1) = 3. %t A133518 Table[NextPrime[Prime[n]^3] - Prime[n]^3, {n, 100}] (* _Bruno Berselli_, Sep 03 2013 *) %o A133518 (PARI) a(n) = {k = 0; p3 = prime(n)^3; while (! isprime(p3+k), k++); k;} \\ _Michel Marcus_, Sep 03 2013 %o A133518 (PARI) a(n) = {p3 = prime(n)^3; nextprime(p3) - p3;} \\ _Michel Marcus_, Sep 03 2013 %o A133518 (Magma) [NextPrime(p^3)-p^3: p in PrimesUpTo(500)]; // _Bruno Berselli_, Sep 03 2013 %Y A133518 Cf. A030078, A054271, A091666, A133517, A133519, A133520, A133521, A133522, (A001223). %K A133518 nonn,easy %O A133518 1,1 %A A133518 _Carl R. White_, Sep 14 2007