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 A370681 #9 Feb 27 2024 01:31:16 %S A370681 1,1,2,3,4,4,6,7,8,6,10,10,12,8,12,15,16,10,18,18,16,12,22,18,24,14, %T A370681 26,24,28,22,30,31,24,18,32,30,36,20,28,36,40,32,42,36,40,24,46,34,48, %U A370681 26,36,42,52,28,48,54,40,30,58,46,60,32,60,63,56,48,66,54 %N A370681 a(n) is the alternating sum of the unitary divisors of n, when these divisors are starting with n and decreasing. %C A370681 a(n) is odd if and only if n is a power of 2. %H A370681 Amiram Eldar, <a href="/A370681/b370681.txt">Table of n, a(n) for n = 1..10000</a> %F A370681 a(n) = A071324(n) if n is squarefree (A005117) or if n is in A370683. %e A370681 The unitary divisors of 6 are {1, 2, 3, 6}, hence a(6) = 6 - 3 + 2 - 1 = 4. %e A370681 The unitary divisors of 12 are {1, 3, 4, 12}, hence a(12) = 12 - 4 + 3 - 1 = 10. %t A370681 a[n_] := Module[{d = Reverse[Select[Divisors[n], CoprimeQ[#, n/#] &]]}, Total[(-1)^(Range[Length[d]] + 1)*d]]; Array[a, 100] %o A370681 (PARI) a(n) = {my(d = Vecrev(select(x->(gcd(x, n/x) == 1), divisors(n)))); sum(i=1, #d, (-1)^(i+1)*d[i]);} %Y A370681 Cf. A005117, A034448, A071323, A071324, A077610, A370683. %K A370681 nonn,easy %O A370681 1,3 %A A370681 _Amiram Eldar_, Feb 26 2024