login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A067062 Numbers n such that sigma(n+2) - sigma(n) = prime(n+1) - prime(n). 1

%I #17 Dec 20 2015 09:18:58

%S 3,5,17,40,41,203,1949,2309,2711,2789,2801,3299,3329,3359,3917,4157,

%T 4217,4259,4637,5009,5021,5231,6449,6497,7757,8087,8219,8627,9419,

%U 9929,10007,10937,11777,12071,14321,15647,15971,16061,16901,18131,18251

%N Numbers n such that sigma(n+2) - sigma(n) = prime(n+1) - prime(n).

%C If n and n+2, prime(n) and prime(n+1) are twin primes, then n is in the sequence. But some values of n are composite.

%H Harry J. Smith, <a href="/A067062/b067062.txt">Table of n, a(n) for n = 1..1000</a>

%p with(numtheory); A067062:=n->`if`(sigma(n+2)-sigma(n)=ithprime(n+1)-ithprime(n),n,NULL); seq(A067062(n), n=1..20000); # _Wesley Ivan Hurt_, Nov 27 2013

%t okQ[n_]:=DivisorSigma[1,n+2]-DivisorSigma[1,n]==Prime[n+1]-Prime[n]; Select[Range[20000],okQ] (* _Harvey P. Dale_, May 24 2011 *)

%o (PARI) { default(primelimit, 4294965247); n=0; for (m=1, 10^10, if (sigma(m+2)-sigma(m) == prime(m+1)-prime(m), write("b067062.txt", n++, " ", m); if (n==1000, return)) ) } \\ _Harry J. Smith_, May 02 2010

%K nonn

%O 1,1

%A _Benoit Cloitre_, Feb 17 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 00:26 EDT 2024. Contains 372203 sequences. (Running on oeis4.)