The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A178659 Numbers n such that n^2 +- (n-1)^2 are primes. 3
 2, 3, 6, 10, 15, 30, 31, 36, 40, 51, 66, 70, 91, 100, 136, 175, 190, 205, 225, 231, 261, 285, 286, 316, 321, 331, 370, 376, 411, 441, 465, 496, 516, 520, 526, 535, 546, 565, 576, 586, 591, 681, 720, 730, 745, 750, 766, 855, 871, 906, 916, 951, 975, 1081, 1120 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS G. C. Greubel, Table of n, a(n) for n = 1..10000 FORMULA a(n) = 1 + A068501(n). - Zak Seidov, Feb 10 2015 EXAMPLE 2 is in the sequence because 2^2 + 1^2 = 5 and 2^2 - 1^2 = 3 are both prime. 3 is in the sequence because 3^2 + 2^2 = 13 and 3^2 - 2^2 = 5 are both prime. MATHEMATICA lst={}; Do[If[PrimeQ[n^2-(n-1)^2]&&PrimeQ[n^2+(n-1)^2], AppendTo[lst, n]], {n, 7!}]; lst Select[Range[8!], PrimeQ[#^2 -(#-1)^2] && PrimeQ[#^2 +(#-1)^2] &] (* G. C. Greubel, Jan 28 2019 *) PROG (PARI) A178659()={my(maxx=1000); n=2; ptr=0; while(n<=maxx, q1=n^2-(n-1)^2; q2=n^2+(n-1)^2; if(isprime(q1)&&isprime(q2), ptr++; write("b178659.txt", ptr, " ", n)); n++); } \\ Bill McEachen, Jun 13 2014 CROSSREFS Cf. A068501. Sequence in context: A227566 A280421 A018141 * A268064 A077011 A246868 Adjacent sequences: A178656 A178657 A178658 * A178660 A178661 A178662 KEYWORD nonn AUTHOR Vladimir Joseph Stephan Orlovsky, Jun 01 2010 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.

Last modified February 5 08:15 EST 2023. Contains 360082 sequences. (Running on oeis4.)