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.

A055469 Primes of the form k(k+1)/2+1 (i.e., central polygonal numbers, or one more than triangular numbers).

Original entry on oeis.org

2, 7, 11, 29, 37, 67, 79, 137, 191, 211, 277, 379, 631, 821, 947, 991, 1129, 1327, 1597, 1831, 2017, 2081, 2347, 2557, 2851, 2927, 3571, 3917, 4561, 4657, 4951, 5051, 5779, 6217, 6329, 8647, 8779, 9181, 9871, 11027, 12721, 13367, 14029, 14197, 14879
Offset: 1

Views

Author

Henry Bottomley, Jun 27 2000

Keywords

Comments

Also primes of the form (n^2 + 7)/8. - Ray Chandler, Oct 08 2005
q=2 and q=5 are the only primes values such that q+1 is a triangular number because 8q+9 is a square for 2 and 5 only. - Benoit Cloitre, Apr 05 2002
n such that A000010(n) = A000217(k). - Giovanni Teofilatto, Jan 29 2010
It is conjectured that this sequence is infinite. - Daniel Forgues, Apr 21 2015

Crossrefs

Programs

  • Mathematica
    Select[Table[(n^2 + 7)/8, {n, 400}], PrimeQ] (* Ray Chandler, Oct 08 2005 *)
    Select[Accumulate[Range[400]]+1,PrimeQ] (* Harvey P. Dale, May 14 2022 *)
  • PARI
    forprime(p=2,10^5, if ( issquare(8*p-7), print1(p, ", "))) \\ Joerg Arndt, Jul 14 2012
    
  • PARI
    list(lim)=my(v=List(),p); forstep(s=3,sqrtint(lim\1*8-7),2, if(isprime(p=(s^2+7)/8), listput(v,p))); Vec(v) \\ Charles R Greathouse IV, May 05 2020

Formula

a(n) = A000124(A067186(n)) = (A110873(n) + 7)/8. - Ray Chandler, Oct 08 2005

A226072 Primes p such that p-1 is a triangular number and p-2 is a square.

Original entry on oeis.org

2, 11, 11027, 16944049179227, 94511138700672573788068264540372768937231403134027
Offset: 1

Views

Author

Alex Ratushnyak, May 25 2013

Keywords

Comments

Intersection of A129545 and A164055.
a(6) has 106 decimal digits: 12450353555...7512227.
a(7) has 381 decimal digits: 49394105798...1431227.
Roots of corresponding squares and triangular numbers: A226074 and A226073.

Crossrefs

Programs

  • Java
    import java.io.*;
    import java.math.BigInteger;
    public class A226072 {
    public static void main (String[] args) throws Exception {
      try {
        BufferedReader in = new BufferedReader(
          new FileReader(new File("b164055.txt")));
        String line;
        while ((line = in.readLine()) != null) {
          BigInteger b = new BigInteger(line.split(" ")[1]);
          b = b.add(BigInteger.ONE);
          if (b.isProbablePrime(80))
            System.out.printf("%s, ", b.toString());
        }
      } catch (Exception e) {  e.printStackTrace();  }
    }
    }
  • Mathematica
    Select[Prime[Range[1500]],OddQ[Sqrt[8(#-1)+1]]&&IntegerQ[Sqrt[#-2]]&] (* The program generates the first 3 terms of the sequence. *) (* Harvey P. Dale, Jul 20 2024 *)

A171569 Triangular numbers T such that T-2 is a prime.

Original entry on oeis.org

15, 21, 45, 55, 91, 105, 153, 231, 253, 351, 435, 465, 595, 703, 741, 861, 1035, 1225, 1431, 1485, 1711, 1891, 1953, 2145, 2701, 3003, 3081, 3321, 3741, 4005, 4095, 4465, 4753, 5565, 5671, 6555, 7021, 7875, 8515, 9045, 10011, 10153, 10731, 11175, 11781
Offset: 1

Views

Author

Keywords

Examples

			15-2 = 13, 21-2 = 19, 45-2 = 43, ...
		

Crossrefs

Programs

  • Mathematica
    Select[s=0;Table[n*(n+1)/2,{n,6!}],PrimeQ[ #-2]&]
    Select[Accumulate[Range[200]],PrimeQ[#-2]&] (* Harvey P. Dale, Apr 09 2018 *)

A171570 Triangular numbers T such that T+2 is a prime.

Original entry on oeis.org

1, 3, 15, 21, 45, 105, 171, 231, 351, 465, 561, 741, 861, 1275, 1431, 1485, 2211, 2415, 2775, 3081, 3321, 4005, 4371, 5151, 7875, 8385, 10731, 11175, 11781, 13041, 13695, 14535, 15051, 15225, 17205, 17391, 17955, 18915, 21321, 22155, 23871, 24531
Offset: 1

Views

Author

Keywords

Examples

			1+2=3, 3+2=5, 15+2=17, ..
		

Crossrefs

Programs

  • Mathematica
    Select[s=0;Table[n*(n+1)/2,{n,6!}],PrimeQ[ #+2]&]
    Select[Accumulate[Range[300]],PrimeQ[#+2]&] (* Harvey P. Dale, Jun 27 2017 *)

A345350 Even triangular numbers such that the next integer is nonprime.

Original entry on oeis.org

0, 120, 300, 406, 496, 528, 666, 780, 1176, 1378, 1540, 1770, 2278, 2628, 3160, 3240, 3486, 3828, 4186, 4278, 5356, 5460, 5886, 6670, 6786, 7140, 7260, 7626, 7750, 8128, 8256, 9316, 9730, 10296, 10440, 10878, 11476, 11628, 12090, 12246, 12880, 13530, 14706, 15576
Offset: 1

Views

Author

Tanya Khovanova, Jun 15 2021

Keywords

Comments

Subsequence of A000217 (triangular numbers) and A014494 (even triangular numbers).

Examples

			Even triangular numbers 6, 10, 28, 36, 66, and 78 are all followed by a prime number. Even triangular number 120 is followed by a composite number 121. Thus, a(1) = 120.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[n (n + 1)/2, {n, 0, 200}], EvenQ[#] && ! PrimeQ[# + 1] &]
    Select[Accumulate[Range[0,300]],EvenQ[#]&&!PrimeQ[#+1]&] (* Harvey P. Dale, Mar 23 2025 *)
  • PARI
    lista(nn) = for (n=1, nn, my(t=n*(n+1)/2); if (!(t%2) && !isprime(t+1), print1(t, ", "))) \\ Michel Marcus, Jun 16 2021
  • Python
    from sympy import isprime
    def A014494(n): return (2*n+1)*(2*n+1-(-1)**n)//2
    def ok(et): return not isprime(et+1)
    print(list(filter(ok, (A014494(n) for n in range(90))))) # Michael S. Branicky, Jun 15 2021
    
Showing 1-5 of 5 results.