login
Values of n such that L(4) and N(4) are both prime, where L(k) = (n^2+n+1)*2^(2*k) + (2*n+1)*2^k + 1, N(k) = (n^2+n+1)*2^k + n.
1

%I #21 Mar 21 2019 07:10:20

%S -5,31,223,277,-323,367,415,541,-593,-635,-785,811,877,-893,937,961,

%T -995,-1019,-1055,1063,1081,1117,-1205,1315,-1349,-1523,-1583,-1607,

%U 1837,1915,-2117,-2369,2515,-2777,-2915,-3287,3301,-3329,3343,3391,-3743,-3959,4027,-4163,-4457,-4553,4573,4651

%N Values of n such that L(4) and N(4) are both prime, where L(k) = (n^2+n+1)*2^(2*k) + (2*n+1)*2^k + 1, N(k) = (n^2+n+1)*2^k + n.

%H Vincenzo Librandi and Joerg Arndt, <a href="/A226924/b226924.txt">Table of n, a(n) for n = 1..1000</a>

%H Eric L. F. Roettger, <a href="http://people.ucalgary.ca/~hwilliam/files/A_Cubic_Extention_of_the_Lucas_Functions.pdf">A cubic extension of the Lucas functions</a>, Thesis, Dept. of Mathematics and Statistics, Univ. of Calgary, 2009. See page 195.

%t k = 4; (* adjust for related sequences *) fL[n_] := (n^2 + n + 1)*2^(2*k) + (2*n + 1)*2^k + 1; fN[n_] := (n^2 + n + 1)*2^k + n; nn = 5000; A = {}; For[n = -nn, n <= nn, n++, If[PrimeQ[fL[n]] && PrimeQ[fN[n]], AppendTo[A, n]]]; cmpfunc[x_, y_] := If[x == y, Return[True], ax = Abs[x]; ay = Abs[y]; If[ax == ay, Return[x < y], Return[ ax < ay]]]; Sort[A, cmpfunc] (* _Jean-François Alcover_, Jul 17 2013, translated and adapted from Joerg Arndt's Pari program in A226921 *)

%Y Cf. A226921-A226929, A227448, A227449, A227515-A227523.

%K sign

%O 1,1

%A _N. J. A. Sloane_, Jul 12 2013

%E More terms from _Vincenzo Librandi_, Jul 13 2013