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-4 of 4 results.

A129545 Triangular numbers T such that T+1 is a prime.

Original entry on oeis.org

1, 6, 10, 28, 36, 66, 78, 136, 190, 210, 276, 378, 630, 820, 946, 990, 1128, 1326, 1596, 1830, 2016, 2080, 2346, 2556, 2850, 2926, 3570, 3916, 4560, 4656, 4950, 5050, 5778, 6216, 6328, 8646, 8778, 9180, 9870, 11026, 12720, 13366, 14028, 14196, 14878
Offset: 1

Views

Author

Zak Seidov, May 30 2007

Keywords

Comments

The only triangular numbers T such that T-1 is a (positive) prime are 3 and 6.

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Range[200]],PrimeQ[#+1]&] (* Harvey P. Dale, Nov 08 2011 *)
  • Python
    from sympy import isprime
    def T(n): return n*(n+1)//2
    def ok(T): return isprime(T+1)
    print(list(filter(ok, (T(n) for n in range(175))))) # Michael S. Branicky, Jun 18 2021

Formula

a(n) = A000217(A067186(n)). - R. J. Mathar, Dec 10 2007
a(n) = A055469(n) - 1. - Joerg Arndt, Jun 19 2021

A129634 Least nonnegative m such that T(n) + T(m) is prime, where T(n) = n*(n+1)/2.

Original entry on oeis.org

2, 1, 0, 1, 1, 7, 4, 1, 1, 7, 3, 1, 1, 3, 16, 13, 1, 4, 4, 1, 1, 4, 4, 1, 46, 3, 7, 1, 2, 7, 16, 2, 13, 4, 3, 1, 13, 3, 4, 22, 1, 16, 16, 1, 1, 7, 3, 1, 10, 3, 7, 1, 2, 7, 16, 2, 1, 4, 4, 13, 1, 4, 16, 1, 1, 16, 4, 2, 1, 16, 8, 1, 10, 3, 7, 1, 1, 31, 7, 2, 13, 4, 4, 10, 1, 8, 7, 13, 1, 43, 16, 5, 25, 16
Offset: 0

Views

Author

Jonathan Vos Post, May 31 2007

Keywords

Comments

What is the simplest proof that this is defined for all nonzero n?
It appears that a(n)A130504 provides evidence that a(n) exists for all n. - T. D. Noe, Jun 04 2007

Examples

			a(6) = 4 because T(4) = 10 is the least triangular number whose sum with T(6) = 21 is prime, since {21+0 = 3*7, 21+3 = 2^3*3, 21+6 = 3^3} are all composite, but 21+10 = 31 is prime.
		

Crossrefs

Cf. A069003 (for square numbers).

Programs

  • Mathematica
    nn=100; tri=Range[0,nn]Range[nn+1]/2; Table[k=1; While[k<=Length[tri] && !PrimeQ[tri[[k]]+tri[[n]]], k++ ]; If[k<=Length[tri], k-1,0], {n,Length[tri]}] (* T. D. Noe, Jun 04 2007 *)

Formula

a(n) = Min{m: m*(m+1)/2 + n*(n+1)/2 is prime}. a(n) = Min{m: A000217(m) + A000217(n) is an element of A000040}.

Extensions

Corrected and extended by T. D. Noe, Jun 04 2007

A129546 Numbers k such that T(k)+10 is the next prime after T(k), where T(k) = A000217(k).

Original entry on oeis.org

58, 61, 98, 138, 193, 217, 222, 233, 253, 266, 338, 358, 373, 393, 398, 402, 453, 461, 466, 477, 481, 542, 553, 557, 586, 597, 602, 618, 633, 646, 662, 761, 822, 838, 853, 857, 877, 898, 901, 913, 918, 926, 941, 986, 1006, 1041, 1061, 1077, 1126, 1157, 1161
Offset: 1

Views

Author

Zak Seidov, May 30 2007

Keywords

Examples

			T(58)=1711 and 1711+10=1721 is the least prime > 1711;
T(61)=1891 and 1891+10=1901 is the least prime > 1891.
		

Crossrefs

Programs

  • Mathematica
    nptQ[n_]:=Module[{tr=(n(n+1))/2},NextPrime[tr]-tr==10]; Select[ Range[ 1200], nptQ] (* Harvey P. Dale, Dec 19 2017 *)
  • PARI
    isok(n) = t = n*(n+1)/2; nextprime(t+1) == (t + 10); \\ Michel Marcus, Oct 13 2013

A129540 Triangular numbers T such that T+10 is the next prime after T.

Original entry on oeis.org

1711, 1891, 4851, 9591, 18721, 23653, 24753, 27261, 32131, 35511, 57291, 64261, 69751, 77421, 79401, 81003, 102831, 106491, 108811, 114003, 115921, 147153, 153181, 155403, 171991, 178503, 181503, 191271, 200661, 208981, 219453
Offset: 1

Views

Author

Zak Seidov, May 29 2007

Keywords

Crossrefs

Programs

  • Maple
    a := proc (n) if nextprime((1/2)*n*(n+1)) = 10+(1/2)*n*(n+1) then (1/2)*n*(n+1) else end if end proc: seq(a(n), n = 1 .. 700); # Emeric Deutsch, Jun 20 2007
  • Mathematica
    Select[Accumulate[Range[0, 700]],NextPrime[#]==#+10&] (* James C. McMahon, Jan 22 2025 *)

Extensions

More terms from Emeric Deutsch, Jun 20 2007
Showing 1-4 of 4 results.