login
Numbers n with 2*n + 1 and 2*n^3 + 1 both prime.
2

%I #11 Apr 17 2016 09:27:30

%S 1,2,5,6,9,11,20,21,26,29,30,35,44,86,95,96,99,111,120,134,140,165,

%T 186,191,204,221,231,249,260,299,321,330,354,375,380,384,386,431,440,

%U 455,485,491,506,515,545,551,554,596,600,629

%N Numbers n with 2*n + 1 and 2*n^3 + 1 both prime.

%C This sequence is interesting because of the conjecture in the comments in A230507.

%H Zhi-Wei Sun, <a href="/A230506/b230506.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 1 since 2*1 + 1 = 2*1^3 + 1 = 3 is a prime.

%e a(2) = 2 since 2*2 + 1 = 5 and 2*2^3 + 1 = 17 are both prime.

%t q[n_]:=PrimeQ[2n+1]&&PrimeQ[2n^3+1]

%t m=0

%t Do[If[q[n],m=m+1;Print[m," ",n]],{n,1,629}]

%Y Cf. A000040, A005097, A201107, A230507.

%K nonn

%O 1,2

%A _Zhi-Wei Sun_, Oct 21 2013