OFFSET
1,1
COMMENTS
This sequence and A002144 give rise to a class of monic polynomials x^2 + bx + c where b = +- A002144(n) and c = +- a(n)/4 that will factor over the integers regardless of the sign of c. For example, x^2 - 13x - 30 and x^2 - 13x + 30 are two such polynomials. Further polynomials with this property can be found by transforming the roots.
EXAMPLE
a(2) = 120 and A002144(2) = 13. 13^2 - 120 = 7^2 and 13^2 + 120 = 17^2.
PROG
(PARI) getpr(n) = {nb = 0; p = 2; while (nb != n, p = nextprime(p+1); if ((p % 4) == 1, nb++); ); p; }
a(n) = {p = getpr(n); psq = p^2; k = 1; while (!issquare(psq+k) || !issquare(psq-k), if (k>psq, k = 0; break); k++; ); k; } \\ Michel Marcus, Sep 25 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Owen Mertens (owenmertens(AT)missouristate.edu), Nov 16 2005
EXTENSIONS
Definition corrected by Zak Seidov, Jul 20 2010
a(17) corrected by Zachary Sizer, Jan 01 2025
STATUS
approved