OFFSET
1,1
COMMENTS
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 *)
PROG
(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(); }
}
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 25 2013
STATUS
approved