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

A115882 Numbers k such that k + prime(k) gives a triangular number.

Original entry on oeis.org

1, 20, 49, 65, 103, 176, 279, 284, 299, 437, 513, 553, 656, 973, 1271, 1779, 1921, 2156, 2312, 2347, 2554, 2759, 3176, 3379, 4008, 4028, 4132, 5255, 6354, 6764, 7116, 8299, 8334, 8366, 8723, 9277, 9755, 10092, 10475, 10631, 11429, 11842, 12633, 13157, 13627
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Examples

			103 + prime(103) = 103 + 563 = 666 = T(36).
		

Crossrefs

Programs

  • Mathematica
    TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; Select[Range[20000], TriangularQ[# + Prime[#]] &] (* T. D. Noe, Jan 27 2014 *)
  • PARI
    isok(n) = ispolygonal(n + prime(n), 3); \\ Michel Marcus, Jan 25 2014

A115887 Triangular numbers equal to the difference between a prime number and its index.

Original entry on oeis.org

1, 3, 6, 10, 28, 105, 120, 153, 231, 465, 496, 1081, 1378, 1485, 1653, 1711, 2628, 3003, 3081, 3160, 4950, 5050, 5460, 6670, 6903, 8001, 8778, 10296, 11781, 14028, 15225, 16290, 19701, 20503, 21528, 21945, 22155, 24310, 24531, 25200, 27495
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Examples

			28=T(7)=p(13)-13.
		

Crossrefs

Cf. A115883.

Programs

  • Mathematica
    Union[Select[Table[Prime[i]-i,{i,20000}],IntegerQ[Sqrt[8#+1]]&]] (* Harvey P. Dale, Jun 28 2012 *)

A236431 Numbers n such that both prime(n)+n and prime(n)-n give a triangular number.

Original entry on oeis.org

1, 513, 213796
Offset: 1

Views

Author

Michel Marcus, Jan 25 2014

Keywords

Comments

Intersection of A115882 and A115883.
The corresponding primes are 2, 3673, 2955107.
No more terms up to 10^12. - Giovanni Resta, Jan 26 2014

Examples

			prime(1) is 2, and both 2+1=3 and 2-1=1 are triangular.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[214000],AllTrue[{Sqrt[8(Prime[#]-#)+1],Sqrt[8(Prime[#]+#)+ 1]},OddQ]&] (* Harvey P. Dale, Jul 22 2022 *)
  • PARI
    lista(nn) = {p = primes(nn); for (n=1, #p, pn = p[n]; if (ispolygonal(pn - n, 3) && ispolygonal(pn + n, 3), print1(n, ", ")););}
Showing 1-3 of 3 results.