OFFSET
1,1
COMMENTS
For n>1, a(n)== 1 (mod 6). [Proof: the triangular numbers are {0,1,3,4} (mod 6), see A104686. 3 plus triangular numbers in the same set, and only those == 1 (mod 6) can be primes.] - Zak Seidov, Oct 16 2015
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
EXAMPLE
13=10+3, 31=28+3, 139=136+3, 193=190+3, 409=406+3, ...
MATHEMATICA
s=0; lst={}; Do[s+=n; p=s+3; If[PrimeQ[p], AppendTo[lst, p]], {n, 0, 7!}]; lst
Select[Table[n*(n + 1)/2 + 3, {n, 0, 250}], PrimeQ] (* G. C. Greubel, Jul 13 2017 *)
Select[Accumulate[Range[0, 500]]+3, PrimeQ] (* Harvey P. Dale, Jul 30 2018 *)
PROG
(PARI) for(n=0, 1e3, if(isprime(k=3+n*(n+1)/2), print1(k", "))) \\ Altug Alkan, Oct 16 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 03 2009
STATUS
approved