OFFSET
2,3
EXAMPLE
3+-0->primes. 6+-1->primes. 10+-3->primes. 15+-2->primes,..
MATHEMATICA
f[n_]:=Block[{k}, If[OddQ[n], k=0, k=1]; While[ !PrimeQ[n-k]||!PrimeQ[n+k], k+=2]; k]; Table[f[n*(n+1)/2], {n, 2, 5!}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 09 2010
EXTENSIONS
Definition rephrased and offset adapted by R. J. Mathar, Aug 15 2010
STATUS
approved