This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A027861 Numbers n such that n^2 + (n+1)^2 is prime. 37

%I

%S 1,2,4,5,7,9,12,14,17,19,22,24,25,29,30,32,34,35,39,42,47,50,60,65,69,

%T 70,72,79,82,84,85,87,90,97,99,100,102,104,109,110,115,122,130,135,

%U 137,139,144,149,154,157,160,162,164,167,172,174,185,187,189,195,199,202

%N Numbers n such that n^2 + (n+1)^2 is prime.

%C n > 1 never ends in 1, 3, 6 or 8, (that is, n*(n+1) does not end in 2). - _Lekraj Beedassy_, Jul 09 2004

%C n can never be congruent to (1 or 3) mod 5. Because if it were then n^2 + (n+1)^2 would be divisible by 5. In other words for n > 1, this sequence cannot contain any values in A047219. This means that we can immediately discard 40% of all possible n. - _Dmitry Kamenetsky_, Sep 02 2008

%H T. D. Noe and Zak Seidov, <a href="/A027861/b027861.txt">Table of n, a(n) for n = 1..10000</a>

%H P. De Geest, <a href="http://www.worldofnumbers.com/index.html">World!Of Numbers</a>

%F a(n) = (1/2)*(sqrt(2*A027862(n)-1)-1). - _Zak Seidov_, Jul 22 2013

%F A010051(A001844(a(n))). - _Reinhard Zumkeller_, Jul 13 2014

%t Select[Range,PrimeQ[#^2+(#+1)^2]&] (* _Harvey P. Dale_, Dec 31 2017 *)

%o (MAGMA) [n: n in [0..1000] |IsPrime(n^2 + (n+1)^2)]; // _Vincenzo Librandi_, Nov 19 2010

%o a027861 n = a027861_list !! (n-1)

%o a027861_list = filter ((== 1) . a010051 . a001844) [0..]

%o -- _Reinhard Zumkeller_, Jul 13 2014

%o (PARI) is(n)=isprime(n^2 + (n+1)^2) \\ _Charles R Greathouse IV_, Apr 28 2015

%Y Complement of A012132.

%Y Equals (A002731(n+1)-1)/2. A027862 gives primes, A091277 gives prime index.

%Y Cf. A047219, A001844, A010051.

%K nonn,easy

%O 1,2

%A _Patrick De Geest_

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.

Last modified November 21 14:18 EST 2019. Contains 329371 sequences. (Running on oeis4.)