login
A274382
a(n) = gcd(n, n*(n+1)/2 - sigma(n)).
2
1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 6, 1, 4, 1, 1, 1, 24, 1, 1, 1, 14, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 10, 1, 3, 1, 2, 3, 1, 1, 4, 1, 2, 3, 4, 1, 3, 1, 4, 1, 1, 1, 6, 1, 1, 1, 1, 1, 3, 1, 4, 3, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 14, 1, 1
OFFSET
1,2
LINKS
FORMULA
a(n) = gcd(n, A000217(n)-A000203(n)). - Felix Fröhlich, Jun 23 2016
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
Sequence in context: A175432 A204118 A095025 * A318997 A355662 A069897
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Jun 23 2016
STATUS
approved