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!)
A188546 Numbers n such that m=(n^2+1)/2, p=(m^2+1)/2 and q=(p^2+1)/2 are all prime. 6

%I #22 Sep 08 2022 08:45:56

%S 69,271,349,3001,3399,4949,6051,9101,9751,10099,10149,11719,12281,

%T 15911,22569,24269,25201,25889,28841,31979,37271,39901,42109,44929,

%U 46399,48321,50811,60009,63659,63999,71051,71851,75089,76711,87029,96791,103701,110551,111411,112461,113949,125721,126089,127959,129261,131859,132939,137481,144651

%N Numbers n such that m=(n^2+1)/2, p=(m^2+1)/2 and q=(p^2+1)/2 are all prime.

%C a(1) = 69 = A116945(5).

%C Numbers n that generate three primes under the first three iterations of the map n-> A002731(n).

%C Subsequence of A116945.

%H Charles R Greathouse IV, <a href="/A188546/b188546.txt">Table of n, a(n) for n = 1..10000</a>

%t s={}; Do[If[PrimeQ[m=(n^2+1)/2] && PrimeQ[p=(m^2+1)/2] && PrimeQ[q=(p^2+1)/2], Print[n]; AppendTo[s,n]], {n,1,300000,2}]; s

%t mpqQ[n_]:=Module[{m=(n^2+1)/2,p},p=(m^2+1)/2;AllTrue[{m,p,(p^2+1)/2},PrimeQ]]; Select[Range[144700],mpqQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 18 2021 *)

%o (Magma) r:=func< k | (k^2+1) div 2 >; [ n: n in [1..145000 by 2] | IsPrime(r(n)) and IsPrime(r(r(n))) and IsPrime(r(r(r(n)))) ]; // _Bruno Berselli_, Apr 05 2011

%o (PARI) v=vector(10^4);i=0;forstep(n=1,9e9,2,if(isprime(m=(n^2+1)/2)&isprime(p=(m^2+1)/2)&isprime(q=(p^2+1)/2),v[i++]=n;if(i==#v,return(v)))) \\ _Charles R Greathouse IV_, Apr 05 2011

%Y Cf. A002731, A105318, A116945, A188547, A187431.

%K nonn

%O 1,1

%A _Zak Seidov_, Apr 03 2011

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 24 07:50 EDT 2024. Contains 371922 sequences. (Running on oeis4.)