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 A072917 #10 Aug 23 2017 06:07:47 %S A072917 1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,1,1,1,3,1,1,1,3,3,1,1,1,1,3,1,1,3,1, %T A072917 5,1,1,1,5,1,1,1,1,3,5,1,1,1,1,3,5,5,1,1,1,5,1,1,1,1,1,1,1,5,5,3,1,5, %U A072917 3,5,1,5,1,1,1,1,1,5,1,5,5,1,1,5,3,1,3,1,1,5,1,3,1,1,1,5,1,1,1,1 %N A072917 a(n) = p(n) - phi(n), where p(n) is the least prime greater than phi(n). %H A072917 Antti Karttunen, <a href="/A072917/b072917.txt">Table of n, a(n) for n = 1..10000</a> %F A072917 a(n) = A013632(A000010(n)). - _Antti Karttunen_, Aug 22 2017 %e A072917 phi(15) = 8 and the least prime > 8 is 11; hence a(15) = 11 - 8 = 3. %t A072917 a[n_] := Module[{r, p}, p = EulerPhi[n]; r = p + 1; While[ ! PrimeQ[r], r = r + 1]; r - p]; Table[a[i], {i, 1, 100}] %t A072917 lpg[n_]:=Module[{ep=EulerPhi[n]},NextPrime[ep]-ep]; Array[lpg,200] (* _Harvey P. Dale_, May 29 2017 *) %o A072917 (PARI) A072917(n) = (nextprime(1+eulerphi(n)) - eulerphi(n)); \\ _Antti Karttunen_, Aug 22 2017 %Y A072917 Cf. A000010, A013632, A072344. %K A072917 easy,nonn %O A072917 1,15 %A A072917 _Joseph L. Pe_, Aug 11 2002