The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A015710 Least k >= 0 such that phi(n) * sigma(n) + k^2 is a perfect square, or -1 if impossible. 1
 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, 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, 119, 8, 6, 1, 8, 1, 5, 1, 9, 1, 11, 9, 1, 4, 8, 1, 17, -1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,8 LINKS Richard K. Guy, Divisors and desires, Amer. Math. Monthly, 104 (1997), 359-360. MATHEMATICA 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 *) PROG (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 CROSSREFS Cf. A015713 (a(n) is zero), A062354 (phi(n)*sigma(n)). Sequence in context: A258643 A287561 A046924 * A108415 A278572 A136644 Adjacent sequences:  A015707 A015708 A015709 * A015711 A015712 A015713 KEYWORD sign AUTHOR EXTENSIONS a(14), a(30), and a(51) corrected by Sean A. Irvine, Dec 06 2018 Entry revised by Amiram Eldar, Sean A. Irvine, and Michel Marcus, Dec 06 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 12 09:05 EDT 2020. Contains 336438 sequences. (Running on oeis4.)