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!)
A247271 Numbers n such that n^2+1 and 2*n^2+1 are both prime numbers. 1

%I #16 Sep 08 2022 08:46:09

%S 1,6,24,36,66,156,204,240,264,300,306,474,570,636,750,864,936,960,

%T 1146,1176,1290,1494,1524,1716,1974,2034,2136,2310,2406,2706,2736,

%U 2964,3156,3240,3624,3756,3774,3900,3984,4026,4080,4524,4530,4554,4590,4644,4650,4716

%N Numbers n such that n^2+1 and 2*n^2+1 are both prime numbers.

%C Numbers n such that A002522(n) and A058331(n) are prime numbers.

%C a(n)==0 mod 6 because the primes n^2+1 and 2*n^2+1 are congruent to 1 (mod 6).

%C The corresponding pairs of primes (n^2+1,2*n^2+1) are (2,3), (37,73), (577, 1153), (1297,2593), (4357,8713), (24337,48673), ...

%H Jens Kruse Andersen, <a href="/A247271/b247271.txt">Table of n, a(n) for n = 1..10000</a>

%e a(2)=6 because A002522(6)=37 and A058331(6)=73 are both prime numbers.

%p A247271:=n->`if`(isprime(n^2+1) and isprime(2*n^2+1), n, NULL): seq(A247271(n), n=1..10^4); # _Wesley Ivan Hurt_, Sep 12 2014

%t lst={}; Do[p=n^2+1; q=2n^2+1; If[PrimeQ[p] && PrimeQ[q], AppendTo[lst, n]], {n, 5000}]; lst

%o (PARI)

%o for(n=1,10^4,if(isprime(n^2+1)&&isprime(2*n^2+1),print1(n,", "))) \\ _Derek Orr_, Sep 11 2014

%o (Magma) [n: n in [0..5000] | IsPrime(n^2+1) and IsPrime(2*n^2+1)]; // _Vincenzo Librandi_, Sep 14 2014

%Y Cf. A002496, A090698, A002522, A058331.

%K nonn,easy

%O 1,2

%A _Michel Lagneau_, Sep 11 2014

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