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.

A067891 Primes p such that sigma(p+1) = sigma(p-1).

This page as a plain text file.
%I A067891 #26 May 08 2016 16:59:16
%S A067891 367,919,30593,95393,117571,124759,147341,197261,334541,344417,463219,
%T A067891 732257,755081,931757,982759,1996759,2401219,2962697,3013447,4722941,
%U A067891 7892827,13333097,13358407,17946259,19828483,19855471,19904981
%N A067891 Primes p such that sigma(p+1) = sigma(p-1).
%H A067891 Giovanni Resta, <a href="/A067891/b067891.txt">Table of n, a(n) for n = 1..769</a> (terms < 10^12)
%t A067891 fQ[p_] := DivisorSigma[1, p - 1] == DivisorSigma[1, p + 1]; p = 2; lst = {}; While[p < 100000000, If[fQ@ p, AppendTo[lst, p]]; p = NextPrime@ p]; lst (* _Vladimir Joseph Stephan Orlovsky_, Dec 03 2009 and modified by _Robert G. Wilson v_, May 08 2016 *)
%o A067891 (PARI) for(n=2,10^8,if(isprime(n) && sigma(n+1)==sigma(n-1),print1(n,","))) \\ It is more efficient to use forprime(...).
%o A067891 (PARI) is_A067891(p)=sigma(p-1)==sigma(p+1)&&isprime(p) \\ _M. F. Hasler_, Jul 31 2015
%Y A067891 Cf. A067889 (analog with tau).
%K A067891 easy,nonn
%O A067891 1,1
%A A067891 _Benoit Cloitre_, Mar 02 2002
%E A067891 More terms from _Rick L. Shepherd_, Apr 19 2002