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.

A174969 Composites of form n^2 + n + 1.

Original entry on oeis.org

21, 57, 91, 111, 133, 183, 273, 343, 381, 507, 553, 651, 703, 813, 871, 931, 993, 1057, 1191, 1261, 1333, 1407, 1561, 1641, 1807, 1893, 1981, 2071, 2163, 2257, 2353, 2451, 2653, 2757, 2863, 3081, 3193, 3423, 3661, 3783, 4033, 4161, 4291, 4557, 4693, 4971
Offset: 1

Views

Author

Michel Lagneau, Apr 02 2010

Keywords

Examples

			n=1 gives 1^2+1+1=3, which is prime and so not a term, and similarly for n=2,3; n=4 gives 21=3*7, which is a(1).
		

References

  • L. Poletti, Le serie dei numeri primi appartenente alle due forme quadratiche (A) n^2+n+1 e (B) n^2+n-1 per l'intervallo compreso entro 121 milioni, e cioè per tutti i valori di n fino a 11000, Atti della Reale Accademia Nazionale dei Lincei, Memorie della Classe di Scienze Fisiche, Matematiche e Naturali, s. 6, v. 3 (1929), pages 193-218.

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 0 to 200 do:x:=n^2+n+1: if type(x,prime)=false then print (x):else fi:od:
  • Mathematica
    Select[Array[ #^2+#+1&,6!,2],!PrimeQ[ # ]&] (* Vladimir Joseph Stephan Orlovsky, Apr 07 2010 *)
  • PARI
    isok(k) = (k>1) && !isprime(k) && issquare(4*k-3); \\ Michel Marcus, Apr 20 2022

Extensions

Example edited and keyword uned removed by D. S. McNeil, Nov 17 2010