login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226921 Values of n such that L(1) and N(1) 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
0, 1, -3, 3, -5, 13, 25, 31, -33, 37, -39, 55, -57, -71, 79, -87, -159, 181, -183, 219, -221, -243, -255, 255, 279, -281, 289, -291, 307, 325, 333, -353, -369, 375, -395, -423, -435, -495, -501, 507, -551, -579, -633, 703, -711, -731, 739, 781, 825, -857, 891, 907, 927, 955, -957, -963, -981 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Vincenzo Librandi and Joerg Arndt, Table of n, a(n) for n = 1..1000

Eric L. F. Roettger, A cubic extension of the Lucas functions, Thesis, Dept. of Mathematics and Statistics, Univ. of Calgary, 2009. See page 195.

MATHEMATICA

k = 1; (* 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 = 1000; 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 *)

PROG

(PARI)

k=1;  /* 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;

N=1000;  A=[];

for(n=-N, +N, if (isprime(fL(n)) & isprime(fN(n)), A=concat(A, n) ) );

cmpfunc(x, y)= {

    if(x==y, return(0) );

    my( ax=abs(x), ay=abs(y) );

    if ( ax==ay, return( sign(x-y) ) );

    return( sign(ax-ay) );

}

A=vecsort(A, cmpfunc)

\\ Joerg Arndt, Jul 15 2013

CROSSREFS

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

Sequence in context: A298478 A144419 A212322 * A133190 A052898 A183483

Adjacent sequences:  A226918 A226919 A226920 * A226922 A226923 A226924

KEYWORD

sign

AUTHOR

N. J. A. Sloane, Jul 12 2013

EXTENSIONS

More terms from Vincenzo Librandi, Jul 15 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 09:33 EST 2019. Contains 329843 sequences. (Running on oeis4.)