cp's OEIS Frontend

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.

A274382 a(n) = gcd(n, n*(n+1)/2 - sigma(n)).

Original entry on oeis.org

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

Views

Author

Paolo P. Lava, Jun 23 2016

Keywords

Examples

			a(6) = 3 because 6*7/2 - sigma(6) = 21 - 12 = 9 and gcd(6,9) = 3.
		

Crossrefs

Programs

  • Magma
    [GCD(n, n*(n+1) div 2-SumOfDivisors(n)): n in [1..100]]; // Vincenzo Librandi, Jun 25 2016
  • 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 *)
  • PARI
    a(n) = gcd(n, n*(n+1)/2-sigma(n)) \\ Felix Fröhlich, Jun 23 2016
    

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