OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..100
MAPLE
with(numtheory): for n from 1 to 10^6 do a := divisors(n): s1 := add(a[m]*phi(a[m]), m=1..nops(a)): s2 := add(phi(a[m])/a[m], m=1..nops(a)): if type((s1+1)/(2*s2), integer) then printf(`%d, `, n); fi: od:
MATHEMATICA
f[n_] := (k = n; While[ !IntegerQ[ Sum[ LCM[k, i], {i, 1, k}] / Sum[ GCD[k, i], {i, 1, k}]], k++ ]; k); j = 1; Do[ m = f[j]; Print[m]; j = m + 1, {n, 1, 9}]
f1[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); f2[p_, e_] := e*(p - 1)/p + 1; q[n_] := IntegerQ[(1 + Times @@ f1 @@@ (fct = FactorInteger[n]))/(2 * Times @@ f2 @@@ fct)]; Select[Range[10^5], q] (* Amiram Eldar, May 02 2023 *)
PROG
(PARI) for(n=1, 1156, if(sum(i=1, n, lcm(n, i))%sum(i=1, n, gcd(n, i))==0, print1(n, ", ")))
(PARI) is(n) = {my(f = factor(n)); (1 + prod(i = 1, #f~, (f[i, 1]^(2*f[i, 2] + 1) + 1)/(f[i, 1] + 1))) % (2*prod(i = 1, #f~, (f[i, 2]*(f[i, 1] - 1)/f[i, 1] + 1))) == 0; } \\ Amiram Eldar, May 02 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jun 19 2002
EXTENSIONS
Edited by Robert G. Wilson v, Jun 22 2002
More terms from Vladeta Jovovic, Jun 22 2002
More terms from Sean A. Irvine, Feb 01 2011
Corrected definition - Richard L. Ollerton, May 06 2021
STATUS
approved