cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A027861 Numbers k such that k^2 + (k+1)^2 is prime.

This page as a plain text file.
%I A027861 #72 Apr 15 2025 17:45:53
%S A027861 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 A027861 70,72,79,82,84,85,87,90,97,99,100,102,104,109,110,115,122,130,135,
%U A027861 137,139,144,149,154,157,160,162,164,167,172,174,185,187,189,195,199,202
%N A027861 Numbers k such that k^2 + (k+1)^2 is prime.
%C A027861 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
%C A027861 k > 1 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
%H A027861 T. D. Noe and Zak Seidov, <a href="/A027861/b027861.txt">Table of n, a(n) for n = 1..10000</a>
%H A027861 Patrick De Geest, <a href="http://www.worldofnumbers.com/index.html">World!Of Numbers</a>
%F A027861 a(n) = (A002731(n)-1)/2.
%F A027861 a(n) = (sqrt(2*A027862(n)-1)-1)/2. - _Zak Seidov_, Jul 22 2013
%F A027861 A010051(A001844(a(n))) = 1. - _Reinhard Zumkeller_, Jul 13 2014
%F A027861 a(n) = floor(sqrt(A027862(n)/2)). - _Rémi Guillaume_, Apr 02 2025
%t A027861 Select[Range[250],PrimeQ[#^2+(#+1)^2]&] (* _Harvey P. Dale_, Dec 31 2017 *)
%o A027861 (Magma) [n: n in [0..1000] |IsPrime(n^2 + (n+1)^2)]; // _Vincenzo Librandi_, Nov 19 2010
%o A027861 (Haskell)
%o A027861 a027861 n = a027861_list !! (n-1)
%o A027861 a027861_list = filter ((== 1) . a010051 . a001844) [0..]
%o A027861 -- _Reinhard Zumkeller_, Jul 13 2014
%o A027861 (PARI) is(n)=isprime(n^2 + (n+1)^2) \\ _Charles R Greathouse IV_, Apr 28 2015
%Y A027861 Complement of A012132.
%Y A027861 Cf. A002731 (2k+1 values), A027862 (resulting primes), A091277 (indices of resulting primes).
%Y A027861 Cf. A047219 (k mod 5 = 1 or 3), A001844 (centered squares), A010051.
%K A027861 nonn,easy
%O A027861 1,2
%A A027861 _Patrick De Geest_