%I #25 Oct 06 2024 09:12:19
%S 83,251,683,1091,2531,5051,7211,11171,15131,16883,18731,21683,24851,
%T 29411,33083,42491,59651,85691,107171,109451,114083,133571,138683,
%U 151883,160091,189011,201251,204371,236891,268211,271811,297683,309131
%N Primes which are the sum of 6 consecutive triangular numbers A000217.
%C Primes of the form 3*k^2 + 18*k + 35 = 3*(k+3)^2 + 8, k >= 0. - _R. J. Mathar_, Apr 06 2009
%C Primes which are the sum of 3 consecutive odd squares A016754. - _Alex Ratushnyak_, Jul 24 2012
%H Vincenzo Librandi, <a href="/A159071/b159071.txt">Table of n, a(n) for n = 1..5000</a>
%e 83 = A000040(23) = Sum_{i=2..7} A000217(i).
%e 251 = A000040(54) = Sum_{i=6..11} A000217(i).
%e 683 = A000040(124) = Sum_{i=12..17} A000217(i).
%t tr[a_]:=Module[{x},s=0;If[a<0,b=Abs[a]+1,b=a];For[i=1,i<b,s+=i;i++ ]; x=s]; lst={};Do[a1=tr[n];b1=tr[n+1];c1=tr[n+2];d1=tr[n+3];e1=tr[n+4]; f1=tr[n+5];p=a1+b1+c1+d1+e1+f1;If[PrimeQ[p],AppendTo[lst,p]],{n,-2, 6!}];lst
%t Select[Table[3n^2+8,{n,2,1000}],PrimeQ] (* _Vincenzo Librandi_, Dec 02 2011 *)
%o (Magma) [a: n in [2..400] | IsPrime(a) where a is 3*n^2+8]; // _Vincenzo Librandi_, Dec 02 2011
%Y Cf. A000217, A016754.
%K nonn,easy
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Apr 04 2009
%E 11 removed, examples edited by _R. J. Mathar_, Apr 06 2009