OFFSET
1,1
COMMENTS
Prime terms in A005448, or primes of the form 3n(n-1)/2 + 1.
Primes that are the sum of 3 consecutive triangular numbers. - Vicente Izquierdo Gomez, Nov 03 2015
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MAPLE
select(isprime, [seq(3*n*(n-1)/2+1, n=1..1000)]); # Robert Israel, Nov 03 2015
MATHEMATICA
lst={}; Do[If[PrimeQ[p=3n(n-1)/2+1], (*Print[p]; *)AppendTo[lst, p]], {n, 10^3}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 21 2008 *)
Select[Total/@Partition[Accumulate[Range[200]], 3, 1], PrimeQ] (* Harvey P. Dale, Dec 29 2020 *)
PROG
(Magma) [a: n in [0..200] | IsPrime(a) where a is (3*n^2 - 3*n + 2) div 2]; // Vincenzo Librandi, Mar 22 2013
(PARI) is(n)=n%6==1 && ispolygonal((n-1)/3, 3) && isprime(n) \\ Charles R Greathouse IV, Nov 03 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Nov 27 2006
STATUS
approved