A217000 Triangular numbers of the form 2p-1 where p is prime.
3, 21, 45, 105, 253, 325, 465, 561, 861, 1081, 1225, 1485, 1653, 1953, 3741, 4005, 4753, 6441, 7021, 7381, 8001, 9045, 10153, 13041, 15753, 19701, 20301, 21945, 23005, 23653, 24753, 25425, 28441, 32385, 35245, 37401, 38781, 41041, 43365, 45753, 46665, 48205
Offset: 1
Keywords
Examples
For A000217 = {0, 1, 3, 6, 10, 15, 21, 28,...}, A000217(6) = 21 = 2*(11)-1. As 11 is prime then A000217(6) is in the sequence. A000217(5) = 15 = 2*(8)-1. As 8 is not prime then A000217(5) is not in the sequence.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
Programs
-
Maple
tn := unapply(n*(n+1)/2,n): f := unapply((t+1)/2,t): T := []: N := []: P := []: for k from 0 to 5000 do t:=tn(k): p := f(k): if p = floor(p) then p = floor(p): if isprime(p) then T := [op(T), t]: N := [op(N), k]: P := [op(P), p]: end if: end if: if nops(T) = 50 then break: end if: end do: T := T;
-
Mathematica
tri = 0; t = {}; Do[tri = tri + n; If[PrimeQ[(tri + 1)/2], AppendTo[t, tri]], {n, 500}]; t (* T. D. Noe, Sep 24 2012 *)
Comments