OFFSET
0,1
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
a(6) = 4 because T(4) = 10 is the least triangular number whose sum with T(6) = 21 is prime, since {21+0 = 3*7, 21+3 = 2^3*3, 21+6 = 3^3} are all composite, but 21+10 = 31 is prime.
MATHEMATICA
nn=100; tri=Range[0, nn]Range[nn+1]/2; Table[k=1; While[k<=Length[tri] && !PrimeQ[tri[[k]]+tri[[n]]], k++ ]; If[k<=Length[tri], k-1, 0], {n, Length[tri]}] - T. D. Noe, Jun 04 2007
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 31 2007
EXTENSIONS
Corrected and extended by T. D. Noe, Jun 04 2007
STATUS
approved