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 A015710 #25 Dec 07 2018 12:31:24 %S A015710 0,1,1,-1,1,1,1,2,-1,3,1,3,1,0,2,29,1,-1,1,5,4,1,1,2,26,5,3,2,1,0,1,4, %T A015710 1,6,2,8,1,3,5,2,1,2,1,1,8,4,1,15,-1,16,0,7,1,7,6,6,6,9,1,4,1,6,10, %U A015710 119,8,6,1,8,1,5,1,9,1,11,9,1,4,8,1,17,-1,1 %N A015710 Least k >= 0 such that phi(n) * sigma(n) + k^2 is a perfect square, or -1 if impossible. %H A015710 Richard K. Guy, <a href="https://www.jstor.org/stable/2974586">Divisors and desires</a>, Amer. Math. Monthly, 104 (1997), 359-360. %t A015710 a[n_] := Module[{m = EulerPhi[n]*DivisorSigma[1, n]}, If[Mod[m, 4] == 2, -1, k = 0; While[!IntegerQ[Sqrt[m + k^2]], k++]; k]]; Array[a, 100] (* _Amiram Eldar_, Dec 07 2018 *) %o A015710 (PARI) a(n) = {my(x = sigma(n)*eulerphi(n)); if ((x % 4) == 2, -1, my(k=0); while (! issquare(x+k^2), k++); k;);} \\ _Michel Marcus_, Dec 07 2018 %Y A015710 Cf. A015713 (a(n) is zero), A062354 (phi(n)*sigma(n)). %K A015710 sign %O A015710 1,8 %A A015710 _Robert G. Wilson v_ %E A015710 a(14), a(30), and a(51) corrected by _Sean A. Irvine_, Dec 06 2018 %E A015710 Entry revised by _Amiram Eldar_, _Sean A. Irvine_, and _Michel Marcus_, Dec 06 2018