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.

Showing 1-1 of 1 results.

A225077 Smaller of the two consecutive primes whose sum is a triangular number.

Original entry on oeis.org

17, 37, 59, 103, 137, 149, 313, 467, 491, 883, 911, 1277, 1423, 1619, 1783, 2137, 2473, 2729, 4127, 4933, 5437, 5507, 6043, 6359, 10039, 10453, 11717, 13397, 15809, 17489, 20807, 21821, 23027, 27631, 28307, 28813, 29669, 33029, 36947, 39103, 44203, 48281
Offset: 1

Views

Author

Alex Ratushnyak, May 28 2013

Keywords

Crossrefs

Cf. A175132 (numbers n such that sum of two consecutive primes is triangular(n)).
Cf. A181902 and A154634 (average of two consecutive primes is a triangular number).
Cf. A075190 and A225195 (average of two consecutive primes is a square).
Cf. A074924 and A061275 (sum of two consecutive primes is a square).

Programs

  • Maple
    f:= proc(n) local m,p,q;
      m:= n*(n+1)/2;
      p:= prevprime(ceil(m/2));
      q:= nextprime(p);
      if p+q=m then p fi
    end proc:
    map(f, [$3..500]); # Robert Israel, May 04 2020
  • Mathematica
    tri[n_] := IntegerQ[Sqrt[1 + 8 n]]; t = {}; p1 = 2; While[Length[t] < 50, p2 = NextPrime[p1]; If[tri[p1 + p2], AppendTo[t, p1]]; p1 = p2]; t (* T. D. Noe, May 28 2013 *)

Formula

a(n) + nextprime(a(n)) = A000217(A175132(n)).
Showing 1-1 of 1 results.