%I #9 Nov 27 2016 22:02:09
%S 2,3,13,19,29,107,113,149,227,233,239,317,353,359,479,557,563,569,647,
%T 653,659,1187,1193,1229,1307,1373,1409,1487,1493,1499,1619,1697,1733,
%U 1811,1847,1913,1949,2027,2063,2069,2447,2657,2663,2699,2777,2843,2879,2957,2963
%N a(1) = 2. a(n) is the smallest prime such that a(n) - a(n-1) is a triangular number.
%t triQ[n_]:=IntegerQ[Sqrt[8n+1]];
%t NestList[(x=NextPrime[#]; While[!triQ[x-#],x=NextPrime[x]];x)&,2,100]
%o (PARI) lista(nn) = {print1(p = 2, ", "); for (n=2, nn, q = nextprime(p+1); while (! ispolygonal(q-p, 3), q = nextprime(q+1)); print1(q, ", "); p = q;);} \\ _Michel Marcus_, Nov 13 2016
%Y Cf. A278139.
%K easy,nonn
%O 1,1
%A _Ivan N. Ianakiev_, Nov 13 2016
|