login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A200653
a(n) = greatest k with -3<k<2*n such that n*(n+1)+k and n*(n+1)+k+2 are twin primes.
2
1, -1, 5, 0, -1, -1, 3, -1, 17, 0, 17, 23, 15, 17, 29, 9, 5, 5, 0, 11, -1, 15, 17, 41, 9, 0, 53, 45, 11, 0, 57, 35, 29, 39, 59, 0, 45, 5, 59, 57, 65, 71, 57, 47, 71, 75, 83, 29, 0, 41, 77, 45, 0, 29, 87, 107, 83, 105, 41, 107, 69, 113, 125, 111, 47, 125
OFFSET
1,3
COMMENTS
There are only 11 0 values for n<434, and no more 0 values for n>433.
If n>433, a(n) is > A200652.
MAPLE
A200653 := proc(n)
for k from 2*n-1 to -2 by -1 do
if isprime(n*(n+1)+k) and isprime(n*(n+1)+k+2) then
return k;
end if;
end do:
return 0 ;
end proc:
seq(A200653(n), n=1..80) ; # R. J. Mathar, Nov 22 2011
MATHEMATICA
a[n_]:=Module[{k=0}, For[m=-2, m<2n, m++, If[PrimeQ[n(n+1)+m]&&PrimeQ[n(n+1)+m+2], k=m]]; k]; Array[a, 66] (* Stefano Spezia, Apr 01 2024 *)
CROSSREFS
Cf. A200652.
Sequence in context: A199916 A363041 A180494 * A371940 A058064 A316568
KEYWORD
sign
AUTHOR
Pierre CAMI, Nov 20 2011
STATUS
approved