A114200 When the n-th term of this sequence is added to or subtracted from the square of the n-th prime of the form 4k + 1 (i.e., A002144(n)), the result in both cases is a square.
24, 120, 240, 840, 840, 720, 2520, 1320, 5280, 6240, 9360, 3960, 10920, 3360, 18480, 14280, 22440, 17160, 6840, 31920, 10920, 26520, 43680, 50160, 16320, 35880, 57960, 73920, 38760, 15600, 46200, 100800, 107640, 122400, 138600, 128520, 148200
Offset: 1
Keywords
Examples
a(2) = 120 and A002144(2) = 13. 13^2 - 120 = 7^2 and 13^2 + 120 = 17^2.
Crossrefs
Cf. A002144.
Programs
-
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
Extensions
Definition corrected by Zak Seidov, Jul 20 2010
a(17) corrected by Zachary Sizer, Jan 01 2025
Comments