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 A072109 #32 May 02 2023 02:27:07 %S A072109 1,4,36,125,469,536,882,1156,8532,8775,25012,32000,34749,36324,37179, %T A072109 61952,147456,405224,451584,644304,954084,1185921,1560546,1562500, %U A072109 1982464,3080025,5229378,5784025,6138868,9231327,12806144,22108500,25509168,25562264,29762208,40894464,45001899,47397636,49242375 %N A072109 Numbers k such that Sum_{i=1..k} gcd(k,i) divides Sum_{i=1..k} lcm(k,i). %H A072109 Amiram Eldar, <a href="/A072109/b072109.txt">Table of n, a(n) for n = 1..100</a> %F A072109 Numbers k such that A018804(k) divides A051193(k). %p A072109 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: %t A072109 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}] %t A072109 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 *) %o A072109 (PARI) for(n=1,1156,if(sum(i=1,n,lcm(n,i))%sum(i=1,n,gcd(n,i))==0,print1(n,","))) %o A072109 (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 %Y A072109 Cf. A018804, A051193. %K A072109 nonn %O A072109 1,2 %A A072109 _Benoit Cloitre_, Jun 19 2002 %E A072109 Edited by _Robert G. Wilson v_, Jun 22 2002 %E A072109 More terms from _Vladeta Jovovic_, Jun 22 2002 %E A072109 More terms from _Sean A. Irvine_, Feb 01 2011 %E A072109 Corrected definition - _Richard L. Ollerton_, May 06 2021