login
Numbers n such that 1+16n^2, 1+16(n+1)^2 and 1+16(n+2)^2 are prime.
2

%I #25 Sep 08 2022 08:46:11

%S 4,29,44,64,109,174,329,614,1044,1694,1879,2044,2254,2474,2709,3814,

%T 5024,5039,5154,5364,5634,5784,6244,6624,6779,6804,6949,7964,8079,

%U 8509,8624,9034,9324,9394,9729,10719,11114,11504,11954,12149,13064,13319,13354,13554,14019

%N Numbers n such that 1+16n^2, 1+16(n+1)^2 and 1+16(n+2)^2 are prime.

%C Numbers n, n+1 and n+2 are terms in A255634.

%C The corresponding primes for 1+16n^2 are 257, 13457, 30977, 65537, 190097, 484417, ... (all == 7 mod 10);

%C The corresponding primes for 1+16(n+1)^2 are 401, 14401, 32401, 67601, 193601, 490001, ... (all == 1 mod 10);

%C The corresponding primes for 1+16(n+2)^2 are 577, 15377, 33857, 69697, 197137, 495617, ... (all == 7 mod 10).

%H Harvey P. Dale, <a href="/A255635/b255635.txt">Table of n, a(n) for n = 1..1000</a>

%p A255635:=n->`if`(isprime(1+16*n^2) and isprime(1+16*(n+1)^2) and isprime(1+16*(n+2)^2), n, NULL): seq(A255635(n), n=1..2*10^4); # _Wesley Ivan Hurt_, Feb 28 2015

%t Select[Range[15000],AllTrue[{16#^2,16(#+1)^2,16(#+2)^2}+1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Oct 09 2015 *)

%o (PARI) select(n->isprime(1+16*n^2) && isprime(1+16*(n+1)^2) && isprime(1+16*(n+2)^2), vector(15000, n, n)) \\ _Colin Barker_, Mar 01 2015

%o (Magma) [n: n in [0..15000] | forall{16*n^2+i: i in [1, 32*n+17, 64*n+65] | IsPrime(16*n^2+i)}]; // _Vincenzo Librandi_, Mar 04 2015

%Y Cf. A001912, A005574, A255634.

%K nonn

%O 1,1

%A _Zak Seidov_, Feb 28 2015