cp's OEIS Frontend

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.

A072918 a(n) = p(n) - sigma(n), where p(n) is the least prime greater than sigma(n).

This page as a plain text file.
%I A072918 #16 Nov 07 2017 18:30:40
%S A072918 1,2,1,4,1,1,3,2,4,1,1,1,3,5,5,6,1,2,3,1,5,1,5,1,6,1,1,3,1,1,5,4,5,5,
%T A072918 5,6,3,1,3,7,1,1,3,5,1,1,5,3,2,4,1,3,5,7,1,7,3,7,1,5,5,1,3,4,5,5,3,1,
%U A072918 1,5,1,2,5,13,3,9,1,5,3,5,6,1,5,3,1,5,7,1,7,5,1,5,3,5,7,5,3,2,1,6
%N A072918 a(n) = p(n) - sigma(n), where p(n) is the least prime greater than sigma(n).
%H A072918 Antti Karttunen, <a href="/A072918/b072918.txt">Table of n, a(n) for n = 1..16384</a>
%F A072918 a(n) = A013632(A000203(n)). - _Antti Karttunen_, Nov 07 2017
%e A072918 phi(4) = 7 and the least prime > 7 is 11; hence a(4) = 11 - 7 = 4.
%t A072918 ps[n_]:=Module[{sn=DivisorSigma[1,n]}, NextPrime[sn]-sn]; ps/@Range[100] (* _Harvey P. Dale_, Feb 02 2011 *)
%o A072918 (PARI) A072918(n) = (nextprime(1+sigma(n)) - sigma(n)); \\ _Antti Karttunen_, Nov 07 2017
%Y A072918 Cf. A000203, A013632, A202111.
%K A072918 easy,nonn
%O A072918 1,2
%A A072918 _Joseph L. Pe_, Aug 11 2002