login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

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

%I

%S 6,2100,20586,669054,745590,6556122,9317496,10190796,15648732,

%T 18215196,25561410,35613990,36710652,38649066,41124594,41711874,

%U 46576524,48701400,49406358,59278296,70038948,74993808,75553092,83606418,84182154,88000374,92527764,98969052,100691976

%N Numbers n such that the following are six primes: 2*n^2 +- 1, 3*n^2 +- 1, 5*n^2 +- 1.

%C 6 is in the sequence because the following are six primes: 71, 73, 107, 109, 179, 181.

%t 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 *)

%o (Java)

%o import java.math.BigInteger;

%o public class A226461 {

%o public static void main (String[] args) {

%o for (long n = 1; n < (1L << 30); n++)

%o long x = n*n*5;

%o BigInteger b = BigInteger.valueOf(x+1);

%o if (!b.isProbablePrime(80)) continue;

%o b = BigInteger.valueOf(x-1);

%o if (!b.isProbablePrime(80)) continue;

%o x = n*n*2;

%o b = BigInteger.valueOf(x+1);

%o if (!b.isProbablePrime(80)) continue;

%o b = BigInteger.valueOf(x-1);

%o if (!b.isProbablePrime(80)) continue;

%o x = n*n*3;

%o b = BigInteger.valueOf(x+1);

%o if (!b.isProbablePrime(80)) continue;

%o b = BigInteger.valueOf(x-1);

%o if (!b.isProbablePrime(80)) continue;

%o System.out.printf("%d, ", n);

%o }

%o }

%o }

%Y Cf. A173165.

%K nonn

%O 1,1

%A _Alex Ratushnyak_, Jun 08 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 01:25 EST 2021. Contains 349558 sequences. (Running on oeis4.)