OFFSET
1,1
COMMENTS
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.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
MAPLE
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
MATHEMATICA
okQ[n_]:=DivisorSigma[1, n+2]-DivisorSigma[1, n]==Prime[n+1]-Prime[n]; Select[Range[20000], okQ] (* Harvey P. Dale, May 24 2011 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 17 2002
STATUS
approved