2,3

Table of n, a(n) for n=2..84.

3+-0->primes. 6+-1->primes. 10+-3->primes. 15+-2->primes,..

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!}]

Cf. A000217, A172989, A172990

Sequence in context: A195422 A176530 A011319 * A091015 A256097 A058147

Adjacent sequences: A177457 A177458 A177459 * A177461 A177462 A177463

nonn

Vladimir Joseph Stephan Orlovsky, May 09 2010

Definition rephrased and offset adapted by R. J. Mathar, Aug 15 2010

approved