OFFSET
1,2
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = gcd(n, antisigma(n)) = gcd(n, A024816(n)). - Omar E. Pol, Jun 29 2016
EXAMPLE
a(6) = 3 because 6*7/2 - sigma(6) = 21 - 12 = 9 and gcd(6,9) = 3.
MAPLE
with(numtheory); P:=proc(q) local n;
for n from 1 to q do print(gcd(n, n*(n+1)/2-sigma(n))); od; end: P(10^3);
MATHEMATICA
Table[GCD[n, n (n+1)/2 - DivisorSigma[1, n]], {n, 100}] (* Vincenzo Librandi, Jun 25 2016 *)
PROG
(PARI) a(n) = gcd(n, n*(n+1)/2-sigma(n)) \\ Felix Fröhlich, Jun 23 2016
(Magma) [GCD(n, n*(n+1) div 2-SumOfDivisors(n)): n in [1..100]]; // Vincenzo Librandi, Jun 25 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Jun 23 2016
STATUS
approved