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

A124199 Primes of the form k(k+1)/2-2 (i.e., two less than triangular numbers).

Original entry on oeis.org

13, 19, 43, 53, 89, 103, 151, 229, 251, 349, 433, 463, 593, 701, 739, 859, 1033, 1223, 1429, 1483, 1709, 1889, 1951, 2143, 2699, 3001, 3079, 3319, 3739, 4003, 4093, 4463, 4751, 5563, 5669, 6553, 7019, 7873, 8513, 9043, 10009, 10151, 10729, 11173, 11779
Offset: 1

Views

Author

Peter Pein (petsie(AT)dordos.net), Dec 07 2006

Keywords

Comments

Equal to primes of the form (k^2-17)/8. Also equal to primes p such that 8*p+17 is a square. - Chai Wah Wu, Jul 14 2014

Examples

			The (first five triangular numbers)-2 are: -1,1,4,8,13. So a(1)=13 is the first prime of this form.
		

Crossrefs

Cf. A055472.

Programs

  • Mathematica
    Pick[ #1, PrimeQ[ #1]]&[((1/2)*#1*(#1 + 1) - 2 & ) /@ Range[180]]
    Select[Accumulate[Range[250]]-2,PrimeQ] (* Harvey P. Dale, Jun 07 2020 *)
  • PARI
    isok(p) = isprime(p) && ispolygonal(p+2, 3); \\ Michel Marcus, Sep 19 2022
  • Python
    import sympy
    [n*(n+1)/2-2 for n in range(10**6) if isprime(n*(n+1)/2-2)] # Chai Wah Wu, Jul 14 2014
    

A159047 Primes which are triangular numbers plus 3.

Original entry on oeis.org

3, 13, 31, 139, 193, 409, 499, 823, 1381, 1543, 2083, 2281, 3163, 3919, 6673, 7753, 9319, 9733, 17581, 19309, 21739, 22369, 24979, 27031, 27733, 30631, 39343, 40189, 51043, 53959, 54949, 57973, 62131, 67531, 70879, 81409, 85081, 86323, 91381
Offset: 1

Views

Author

Keywords

Comments

For n>1, a(n)== 1 (mod 6). [Proof: the triangular numbers are {0,1,3,4} (mod 6), see A104686. 3 plus triangular numbers in the same set, and only those == 1 (mod 6) can be primes.] - Zak Seidov, Oct 16 2015

Examples

			13=10+3, 31=28+3, 139=136+3, 193=190+3, 409=406+3, ...
		

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[s+=n;p=s+3;If[PrimeQ[p],AppendTo[lst,p]],{n,0,7!}];lst
    Select[Table[n*(n + 1)/2 + 3, {n, 0, 250}], PrimeQ] (* G. C. Greubel, Jul 13 2017 *)
    Select[Accumulate[Range[0,500]]+3,PrimeQ] (* Harvey P. Dale, Jul 30 2018 *)
  • PARI
    for(n=0, 1e3, if(isprime(k=3+n*(n+1)/2), print1(k", "))) \\ Altug Alkan, Oct 16 2015

A159048 Primes of the form m*(m+1)/2 + 4.

Original entry on oeis.org

5, 7, 19, 59, 109, 157, 257, 439, 599, 907, 1039, 1229, 1279, 1489, 1657, 3407, 3659, 4099, 5569, 6907, 7507, 7879, 8389, 9049, 10589, 11329, 11939, 14369, 16657, 17209, 17959, 18149, 18919, 19507, 20507, 22159, 26339, 30139, 31379, 34457, 36319
Offset: 1

Views

Author

Keywords

Examples

			7=3+4, 19=15+4, 59=55+4, 109=105+4, 157=153+4, 257=253+4, ...
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Range[500]]+4,PrimeQ]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    for(n=1, 500, if(isprime(k=n*(n+1)/2 + 4), print1(k, ", "))) \\ G. C. Greubel, Jul 03 2017

Extensions

Edited by N. J. A. Sloane, Apr 06 2009

A159049 Primes of the form (5+ a triangular number A000217).

Original entry on oeis.org

5, 11, 41, 71, 83, 281, 383, 1181, 1601, 2351, 2633, 3491, 3833, 4283, 5783, 6221, 6791, 8783, 10301, 10883, 11633, 12251, 14033, 15581, 18341, 26111, 26801, 30881, 31883, 34721, 38231, 41333, 41621, 42491, 43961, 46061, 47591, 53633, 60383
Offset: 1

Views

Author

Keywords

Examples

			11 is in the list because it is A000217(3)+5 and a prime. 41=36+5= A000217(8)+5 is a prime. 71=66+5=A000217(11)+5 is a prime.
		

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[s+=n;p=s+5;If[PrimeQ[p],AppendTo[lst,p]],{n,0,7!}];lst
    Select[Accumulate[Range[0,500]]+5,PrimeQ] (* Harvey P. Dale, Jul 08 2017 *)
  • PARI
    for(n=1,500, if(isprime(k=n*(n+1)/2 + 5), print1(k, ", "))) \\ G. C. Greubel, Jul 13 2017

Extensions

Definition rephrased, R. J. Mathar, Apr 05 2009

A185510 Array of primes in the natural number array A000027, by antidiagonals.

Original entry on oeis.org

2, 7, 3, 11, 5, 13, 29, 17, 31, 19, 37, 23, 139, 59, 41, 67, 47, 193, 109, 71, 61, 79, 107, 409, 157, 83, 97, 43, 137, 173, 499, 257, 281, 331, 73, 53, 191, 233, 823, 439, 383, 601, 127, 113, 199, 211, 353, 1381, 599, 1181, 709, 197, 179, 829, 101, 277, 467, 1543, 907, 1601, 1087, 283, 239, 1549, 163, 89
Offset: 1

Views

Author

Clark Kimberling, Jan 29 2011

Keywords

Comments

Start with the natural number array A000027:
1....2.....4....7...11...16...22...29...
3....5.....8...12...17...23...30...38...
6....9....13...18...24...31...39...48...
10...14...19...25...32...40...49...59...
15...20...26...33...41...50...60...71...
21...27...34...42...51...61...72...84...
28...35...43...52...62...73...85...98...
Row n of A185510 shows the primes in row n of A000027:
2....7....11...29...37....67....79...137...(A055469)
3....5....17...23...47...107...173...233...(A055472)
13..31...139..193..409...499...823..1381...(A159047)
19..59...109..157..257...439...599...907...(A159048)
41..71....83..281..383..1181..1601..2351...(A159049)
61..97...331..601..709..1087..1231..2707...
43..73...127..197..283..307...503...673...
Conjecture: Every row contains infinitely many primes.
Every prime occurs exactly once; that is, every prime is uniquely expressible as (1/2)(n^2 + (2k-1)n + (k-2)(k-1)) for some positive integers n and k. We assume as true the conjecture that each row is infinite. - Clark Kimberling, Mar 10 2020

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=n+(k+n-2)(k+n-1)/2;
    TableForm[Map[Select[#,PrimeQ]&, Table[f[n,k],{n,1,20}, {k,1,100}]]]

A221055 Primes of the form k*(k+1)*(k+2)/6+2 (i.e., two more than a tetrahedral number).

Original entry on oeis.org

2, 3, 37, 167, 457, 971, 2927, 6547, 12343, 16217, 26237, 105997, 121487, 246907, 273821, 400997, 562477, 657361, 708563, 939931, 1072447, 1216867, 1293701, 1456937, 2027797, 2135447, 2604127, 2997413, 4410551, 5564323, 6209897, 6435691, 7647061, 8442107
Offset: 1

Views

Author

Jayanta Basu, Apr 15 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Table[n*(n + 1)/2, {n, 0, 2000}]] + 2, PrimeQ]
Showing 1-6 of 6 results.