A226074 Numbers k such that k^2+1 is a triangular number and k^2+2 is a prime number.
0, 3, 105, 4116315, 9721683943673162520781155, 35285058531373239343849920668944097883186271103498415
Offset: 1
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.
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(); } } }
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 *)
// see A226069.
Select[Range[155000],PrimeQ[#^2+1]&&OddQ[Sqrt[8(#^2-1)+1]]&] (* Harvey P. Dale, Jul 19 2019 *)
// see A226069.
Select[Range[0,220000],IntegerQ[Sqrt[(#(#+1))/2+1]]&&PrimeQ[(#(#+1))/2+2]&] (* Harvey P. Dale, Mar 01 2023 *)
Comments