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 A007920 #28 Sep 07 2018 11:31:19 %S A007920 2,1,0,0,1,0,1,0,3,2,1,0,1,0,3,2,1,0,1,0,3,2,1,0,5,4,3,2,1,0,1,0,5,4, %T A007920 3,2,1,0,3,2,1,0,1,0,3,2,1,0,5,4,3,2,1,0,5,4,3,2,1,0,1,0,5,4,3,2,1,0, %U A007920 3,2,1,0,1,0,5,4,3,2,1,0,3,2,1,0,5,4,3,2,1,0,7,6,5,4,3,2,1,0,3,2,1,0,1,0,3,2,1,0,1 %N A007920 Smallest number k such that n + k is prime. %C A007920 a(n) = A007918(n) - n. %H A007920 T. D. Noe, <a href="/A007920/b007920.txt">Table of n, a(n) for n = 0..10000</a> %H A007920 M. Popescu, V. Seleacu, <a href="http://doi.org/10.5281/zenodo.9582">About the Smarandache Complementary Prime Function</a>, Smarandache Notions Journal, Vol. 7, No. 1-2-3, 1996, 12-22. %H A007920 F. Smarandache, <a href="http://vixra.org/abs/1005.0049">Only Problems, Not Solutions!</a>, via viXra. %e A007920 a(22) = 1 because 22 + 1 = 23, the next higher prime. %e A007920 a(23) = 0 because 23 is prime. %e A007920 a(24) = 5 because 24 + 5 = 29, the next higher prime. %e A007920 a(25) = 4 because 25 + 4 = 29, the next higher prime. %t A007920 distToPrime[n_] := If[PrimeQ[n], 0, NextPrime[n] - n]; Array[distToPrime, 110, 0] (* _Harvey P. Dale_, Sep 19 2011 *) %o A007920 (PARI) a(n)=nextprime(n)-n %Y A007920 Cf. A064722, A013632 (a slightly different version). %K A007920 nonn,easy %O A007920 0,1 %A A007920 R. Muller %E A007920 More terms from Joanna S. Bartlett (s1117611(AT)cedarville.edu)