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.
%I A002731 M2444 N0971 #61 Aug 01 2024 03:42:29 %S A002731 3,5,9,11,15,19,25,29,35,39,45,49,51,59,61,65,69,71,79,85,95,101,121, %T A002731 131,139,141,145,159,165,169,171,175,181,195,199,201,205,209,219,221, %U A002731 231,245,261,271,275,279,289,299,309,315,321,325,329,335,345,349,371,375,379,391,399,405 %N A002731 Numbers k such that (k^2 + 1)/2 is prime. %C A002731 From _Wolfdieter Lang_, Feb 24 2012: (Start) %C A002731 a(n) = sqrt(8*A129307(n)+1) = sqrt(2*A027862(n)-1), n >= 1. %C A002731 a(n) is the nontrivial solution of the congruence a(n)^2 == 1 (Modd A027862(n)). The trivial one is +1. For Modd n see a comment on A203571. E.g., a(3)^2 = 81 == 1 (Modd 41), see a comment on A027862. %C A002731 (End) %D A002731 L. Euler, De numeris primis valde magnis (E283), reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 3, p. 24. %D A002731 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002731 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002731 Ray Chandler, <a href="/A002731/b002731.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe) %H A002731 L. Euler, <a href="http://eulerarchive.maa.org/pages/E283.html">De numeris primis valde magnis (E283)</a>, The Euler Archive. %F A002731 a(n) = 2*A027861(n) + 1. %t A002731 Select[Range[400], PrimeQ[(#^2 + 1)/2] &] (* _Alonso del Arte_, Feb 24 2012 *) %o A002731 (PARI) %o A002731 forstep(n=1,10^3,2, if(isprime((n^2+1)/2),print1(n,", "))); %o A002731 /* _Joerg Arndt_, Sep 02 2012 */ %o A002731 (Magma) [n: n in [3..410] | IsPrime((n^2+1) div 2) ]; // _Vincenzo Librandi_, Sep 25 2012 %o A002731 (Haskell) %o A002731 a002731 n = a002731_list !! (n-1) %o A002731 a002731_list = filter ((== 1) . a010051 . a000982) [1, 3 ..] %o A002731 -- _Reinhard Zumkeller_, Jul 13 2014 %Y A002731 Cf. A027861. A027862 gives primes, A091277 gives prime indices. %Y A002731 Cf. A000982, A010051, A116945, A129307, A188546, A188547, A187431. %K A002731 nonn,easy,nice %O A002731 1,1 %A A002731 _N. J. A. Sloane_