login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226461 Numbers n such that the following are six primes: 2*n^2 +- 1, 3*n^2 +- 1, 5*n^2 +- 1. 1
6, 2100, 20586, 669054, 745590, 6556122, 9317496, 10190796, 15648732, 18215196, 25561410, 35613990, 36710652, 38649066, 41124594, 41711874, 46576524, 48701400, 49406358, 59278296, 70038948, 74993808, 75553092, 83606418, 84182154, 88000374, 92527764, 98969052, 100691976 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
6 is in the sequence because the following are six primes: 71, 73, 107, 109, 179, 181.
LINKS
MATHEMATICA
spQ[n_]:=AllTrue[Flatten[{2n^2+{1, -1}, 3n^2+{1, -1}, 5n^2+{1, -1}}], PrimeQ]; Select[ Range[101*10^6], spQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 28 2015 *)
PROG
(Java)
import java.math.BigInteger;
public class A226461 {
public static void main (String[] args) {
for (long n = 1; n < (1L << 30); n++)
long x = n*n*5;
BigInteger b = BigInteger.valueOf(x+1);
if (!b.isProbablePrime(80)) continue;
b = BigInteger.valueOf(x-1);
if (!b.isProbablePrime(80)) continue;
x = n*n*2;
b = BigInteger.valueOf(x+1);
if (!b.isProbablePrime(80)) continue;
b = BigInteger.valueOf(x-1);
if (!b.isProbablePrime(80)) continue;
x = n*n*3;
b = BigInteger.valueOf(x+1);
if (!b.isProbablePrime(80)) continue;
b = BigInteger.valueOf(x-1);
if (!b.isProbablePrime(80)) continue;
System.out.printf("%d, ", n);
}
}
}
CROSSREFS
Cf. A173165.
Sequence in context: A004817 A089535 A059081 * A172943 A182789 A056048
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jun 08 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)