cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A217000 Triangular numbers of the form 2p-1 where p is prime.

Original entry on oeis.org

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

Views

Author

César Eliud Lozada, Sep 22 2012

Keywords

Comments

Indexes n in A000217(n): A217001.
The only triangular odd number with the form 2p+1 and p prime is 15=2*7+1?
The only triangular even numbers with the form 2p and p prime are {6,10}?
From Daniel Starodubtsev, Mar 13 2020: (Start)
Proof that 15 is the only triangular number of the form 2p + 1 where p is prime: we can express T(n)=n*(n+1)/2 and p=(T(n)-1)/2=(n*(n+1)/2-1)/2=(n+2)*(n-1)/4, which can be prime only if n+2=4 or n-1=4, from which we get the only possible value n=5 (T(n)=15).
It can also be easily seen that {6,10} are the only possible values of T(n) such that T(n)/2 is prime. (End)

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.
		

Crossrefs

Subsequence of A000217.
Cf. A124174 (2*tr+1 is also a triangular number), A217001.

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 *)