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

A115883 The n-th prime minus n gives a triangular number.

Original entry on oeis.org

1, 2, 4, 5, 7, 13, 34, 37, 46, 62, 104, 111, 210, 259, 274, 296, 306, 439, 488, 502, 513, 751, 763, 817, 969, 998, 1132, 1231, 1405, 1586, 1849, 1982, 2107, 2488, 2578, 2695, 2732, 2752, 2989, 3008, 3079, 3322, 3958, 4201, 4628, 5035, 5594, 5722, 5929
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Examples

			prime(13)-13 = 41-13 = 28 = T(7).
		

Crossrefs

Programs

A115907 Numbers k such that sigma(k) plus the k-th prime is a triangular number.

Original entry on oeis.org

1, 2, 9, 13, 21, 80, 112, 129, 147, 225, 308, 349, 1063, 1282, 1300, 1635, 1880, 2686, 2956, 3517, 3759, 3907, 4058, 5025, 5196, 6742, 7606, 7708, 9244, 10154, 10596, 11259, 11719, 12687, 13167, 13599, 14081, 14624, 15937, 16437, 16766, 18289
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Examples

			sigma(1880) + prime(1880) = 20503 = T(202).
		

Crossrefs

Programs

  • Maple
    filter:= n -> issqr(1+8*(numtheory:-sigma(n)+ithprime(n))):
    select(filter, [$1..10^5]); # Robert Israel, Nov 07 2018
  • Mathematica
    Select[Range[25000],IntegerQ[(Sqrt[8(DivisorSigma[1,#]+Prime[#])+ 1]-1)/2]&] (* Harvey P. Dale, Jun 07 2011 *)
  • PARI
    upto(n) = my(t = 0, res = List(), u = prime(n)); forprime(p = 2, u, t++; c = p + sigma(t); if(ispolygonal(c, 3), listput(res, t))); res \\ David A. Corneth, Nov 08 2018

A115908 Numbers k such that phi(k) + prime(k) is a triangular number.

Original entry on oeis.org

1, 5, 6, 15, 23, 141, 150, 258, 317, 340, 359, 378, 471, 503, 768, 1363, 2175, 2516, 3285, 3342, 3815, 3905, 4385, 4748, 5385, 5976, 6026, 6900, 7048, 7151, 7411, 7698, 8251, 8310, 8828, 10182, 10461, 12022, 12508, 13722, 13840, 15456, 16582
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Examples

			phi(503) + prime(503) = 4095 = T(90).
		

Crossrefs

Programs

  • Mathematica
    With[{trnos = Accumulate[Range[5000]]}, Select[Range[20000], MemberQ[trnos, (EulerPhi[#] + Prime[#])] &]] (* Harvey P. Dale, Jan 12 2011 *)
    Select[Range[20000],OddQ[Sqrt[8(EulerPhi[#]+Prime[#])+1]]&] (* Harvey P. Dale, Dec 08 2024 *)
  • PARI
    isok(n) = ispolygonal(prime(n) + eulerphi(n), 3); \\ Michel Marcus, Jan 25 2014

A115886 Triangular numbers equal to the sum of a prime number with its index.

Original entry on oeis.org

3, 91, 276, 378, 666, 1225, 2080, 2145, 2278, 3486, 4186, 4560, 5565, 8646, 11628, 17020, 18528, 21115, 22791, 23220, 25425, 27730, 32385, 34716, 41905, 42195, 43365, 56616, 69751, 74691, 79003, 93528, 93961, 94395, 98790, 105570, 111628
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Examples

			666=T(36)=103+p(103).
		

Crossrefs

Cf. A115882.

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