login
Values of n such that L(9) and N(9) 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.
20

%I #22 Mar 21 2019 04:18:30

%S 9,-65,91,-227,397,471,-513,555,-663,663,835,861,-875,-1001,1017,

%T -1067,1159,1185,-1239,-1475,-1563,1603,1617,-1881,-1937,1999,2109,

%U -2301,2331,2443,2461,-2471,-2487,-2571,-2879,-2889,2977,2989,3003,-3017,3019,3439,-3467,-3533,3549,3595,-3687,3733,3747,-3867,-3911,3931,4123,4141,-4203,4279,4683,4755,-4865,4975,4995

%N Values of n such that L(9) and N(9) 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.

%C Computed with PARI using commands similar to those used to compute A226921.

%H Vincenzo Librandi and Joerg Arndt, <a href="/A226929/b226929.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 = 9; (* 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