login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A027861 Numbers k such that k^2 + (k+1)^2 is prime. 38
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, 70, 72, 79, 82, 84, 85, 87, 90, 97, 99, 100, 102, 104, 109, 110, 115, 122, 130, 135, 137, 139, 144, 149, 154, 157, 160, 162, 164, 167, 172, 174, 185, 187, 189, 195, 199, 202 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

k > 1 never ends in 1, 3, 6 or 8, (that is, k*(k+1) does not end in 2). - Lekraj Beedassy, Jul 09 2004

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

LINKS

T. D. Noe and Zak Seidov, Table of n, a(n) for n = 1..10000

Patrick De Geest, World!Of Numbers

FORMULA

a(n) = (1/2)*(sqrt(2*A027862(n)-1)-1). - Zak Seidov, Jul 22 2013

A010051(A001844(a(n))) = 1. - Reinhard Zumkeller, Jul 13 2014

MATHEMATICA

Select[Range[250], PrimeQ[#^2+(#+1)^2]&] (* Harvey P. Dale, Dec 31 2017 *)

PROG

(MAGMA) [n: n in [0..1000] |IsPrime(n^2 + (n+1)^2)]; // Vincenzo Librandi, Nov 19 2010

(Haskell)

a027861 n = a027861_list !! (n-1)

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

-- Reinhard Zumkeller, Jul 13 2014

(PARI) is(n)=isprime(n^2 + (n+1)^2) \\ Charles R Greathouse IV, Apr 28 2015

CROSSREFS

Complement of A012132.

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

Cf. A047219, A001844, A010051.

Sequence in context: A286753 A325543 A214051 * A219648 A062428 A250000

Adjacent sequences:  A027858 A027859 A027860 * A027862 A027863 A027864

KEYWORD

nonn,easy

AUTHOR

Patrick De Geest

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 November 23 14:21 EST 2020. Contains 338590 sequences. (Running on oeis4.)