login
Primes p such that q = 4p^2 + 1, r = 4q^2 + 1 and s = 4r^2 + 1 are all primes.
2

%I #20 Oct 19 2017 03:15:03

%S 13,9833,41647,151607,264757,356123,361223,446863,449093,457813,

%T 531383,641057,655927,841697,855947,899263,913687,1052813,1081757,

%U 1379383,1506493,1575757,1685087,1821013,1821377,1981517,2054233,2142037

%N Primes p such that q = 4p^2 + 1, r = 4q^2 + 1 and s = 4r^2 + 1 are all primes.

%C Next terms up to 400000th prime are 2286877, 2524157, 2595247, 2621737, 2931583, 3023437, 3425843, 3428567, 3538517, 3705187, 3777883, 3799717, 3875143, 3913727, 3973553, 4019833, 4167073, 4249523, 4488167, 4651873, 4822193, 4914937, 5054167, 5108293, 5140147, 5465303, 5520007, 5542003. - _Zak Seidov_, Jan 16 2009

%C Subsequence of A122424. - _Pierre CAMI_, Jul 21 2014

%D Clifford A. Pickover, A Passion for Mathematics, John Wiley & Sons, Inc., 2005, p.74.

%H Pierre CAMI, <a href="/A122429/b122429.txt">Table of n, a(n) for n = 1..3636</a>

%e 13 is there because 13, 677, 1833317 and 13444204889957 are prime.

%t Reap[Do[p=Prime[n];q=4p^2+1;r=4q^2+1;s=4r^2+1;If[PrimeQ[{q,r,s}]=={True, True,True},Sow[p]],{n,15000}]][[2,1]]

%t Select[Prime[Range[200000]],AllTrue[NestList[4#^2+1&,#,3],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Nov 22 2015 *)

%o (PARI)

%o f(x)=4*x^2+1;

%o forprime(p=1, 10^8, if(isprime(f(p))&&isprime(f(f(p)))&&isprime(f(f(f(p)))), print1(p, ", "))) \\ _Derek Orr_, Jul 31 2014

%Y Cf. A052291, A005574, A001912, A122424.

%K nonn

%O 1,1

%A _Zak Seidov_, Oct 20 2006

%E More terms from _Don Reble_, Oct 24 2006

%E Edited by _R. J. Mathar_, Nov 02 2009