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 A002640 M3301 N1331 #40 Aug 22 2025 04:31:32 %S A002640 4,7,10,13,19,28,31,34,40,43,52,70,73,76,82,85,91,97,103,112,115,124, %T A002640 127,136,145,148,157,166,175,187,190,199,202,223,241,244,259,265,271, %U A002640 274,280,286,316,325,358,370,376,385,388,409,421,427,442,460,469,472 %N A002640 Numbers k such that (k^2 + k + 1)/3 is prime. %D A002640 A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259. %D A002640 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002640 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002640 Vincenzo Librandi, <a href="/A002640/b002640.txt">Table of n, a(n) for n = 1..1000</a> %H A002640 A. J. C. Cunningham, <a href="/A001912/a001912.pdf">Binomial Factorisations</a>, Vols. 1-9, Hodgson, London, 1923-1929. [Annotated scans of a few pages from Volumes 1 and 2] %H A002640 Hajrudin Fejzić, Dan Rinne, and Bob Stein, <a href="https://www.jstor.org/stable/30044858">On Sums of Cubes</a>, The College Mathematics Journal, Vol. 36, No. 3 (May, 2005), pp. 226-228. See p. 228. %t A002640 Select[Range[500], PrimeQ[(#^2 + # + 1)/3] &] (* _Vincenzo Librandi_, Sep 25 2012 *) %o A002640 (Magma) [n: n in [4..500] | IsPrime((n^2+n+1) div 3)]; // _Vincenzo Librandi_, Nov 18 2010 %o A002640 (PARI) isok(k) = my(x=k^2+k+1); !(x%3) && isprime(x/3); \\ _Michel Marcus_, Aug 22 2025 %Y A002640 Cf. A002384. %K A002640 nonn,easy %O A002640 1,1 %A A002640 _N. J. A. Sloane_