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!)
A211181 Numbers n such that (n+1)^2 + n and (n+1)^2 - n are both prime. 1
1, 2, 3, 5, 8, 12, 14, 15, 20, 27, 38, 54, 59, 69, 75, 99, 119, 143, 147, 153, 162, 168, 173, 192, 194, 218, 245, 287, 293, 329, 342, 348, 357, 392, 395, 404, 447, 455, 489, 495, 500, 518, 540, 560, 572, 603, 605, 609, 624, 762, 768, 785, 855, 920, 993 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
n=1, (n+1)=2; (n+1)^2=4; 4+1=5 and 4-1=3
n=173, (n+1)=174; (n+1)^2=30276; 30276+173=30449 and 30276-173=30103
n=192, (n+1)=193; (n+1)^2=37249; 37249+192=37441 and 37249-192-37057
MATHEMATICA
Select[ Range[1000], PrimeQ[(# + 1)^2 + #] && PrimeQ[(# + 1)^2 - #] &] (* Jonathan Sondow, Feb 12 2013 *)
PROG
Input "n"'n:Lbl colorin:(n+1)^2-n->rtl:(n+1)^2+n->rtm:if IsPrime (rtm) and
isPrime (rtl) Then:Disp n:Pause:Endif:n+1->n:Goto colorin:EndPrgm
Texas Instruments Basic
CROSSREFS
Sequence in context: A176746 A067288 A308075 * A028766 A342494 A022487
KEYWORD
nonn
AUTHOR
César Aguilera, Feb 11 2013
EXTENSIONS
More terms from Jonathan Sondow, Feb 12 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)