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.

A201998 Positive numbers n such that n^2 + n + 41 is composite and there are no positive integers c such that n = c*x^2 + (c + 1)*x + c*41 for an integer x.

Original entry on oeis.org

244, 249, 251, 266, 270, 295, 301, 336, 344, 389, 399, 407, 416, 418, 445, 449, 454, 466, 489, 494, 496, 500, 506, 527, 531, 545, 547, 563, 570, 571, 582, 583, 585, 611, 612, 620, 622, 624, 628, 630, 636, 652, 661, 662, 663, 679, 693, 699
Offset: 1

Views

Author

Matt C. Anderson, Dec 07 2011

Keywords

Comments

The composition of functions k(x) factors. k(x) = (x^2 + x + 41)*(c^2*x^2 + (c^2 + 2*c)*x + c^2*41 + c + 1). So k(x) is the product of two integers greater than one and thus composite.

References

  • John Stillwell, Elements of Number Theory, Springer, 2003, page 3.

Crossrefs

Cf. A007634 (n^2 + n + 41 is composite).
Cf. A235381 (similar to this sequence).

Programs

  • Maple
    maxn:=1000:
    A:={}:
    for n from 1 to maxn do
    g:=n^2+n+41:
    if isprime(g)=false then
    A:=A union {n}:
    end if:
    end do:
    # The set A contains values n such that n^2+n+41 is composite and n < maxn.
    c:=1:
    x:=-1:
    p:=41:
    q:=c*x^2-(c+1)*x+c*p:
    A2:=A:
    while q < maxn do
    while q < maxn do
    A2:=A2 minus {q}:
    A2:=A2 minus {c*x^2+(c+1)*x+c*p}:
    x:=x+1:
    q:=c*x^2-(c+1)*x+c*p:
    end do:
    c:=c+1:
    x:=-1:
    q:=c*x^2-(c+1)*x+c*p:
    end do:
    A2;
  • Mathematica
    Reap[For[n=1, n<700, n++, If[!PrimeQ[n^2+n+41], If[Reduce[c>0 && n == c*x^2+(c+1)*x+41*c , {c, x}, Integers] === False, Sow[n]]]]][[2, 1]] (* Jean-François Alcover, Apr 30 2014 *)