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

A226074 Numbers k such that k^2+1 is a triangular number and k^2+2 is a prime number.

Original entry on oeis.org

0, 3, 105, 4116315, 9721683943673162520781155, 35285058531373239343849920668944097883186271103498415
Offset: 1

Views

Author

Alex Ratushnyak, May 25 2013

Keywords

Comments

a(7) has 191 decimal digits: 222247847...170444715.
Corresponding primes and indices of triangular numbers: A226072 and A226073.
Subsequence of A106328. - Max Alekseyev, Jan 30 2014

Crossrefs

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 *)
Showing 1-2 of 2 results.