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.

A378053 a(n) = gcd(Product_{d|n} (d + 1), Product_{d|n, d>1} (d - 1)) = gcd(A020696(n), A377484(n)).

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 2, 3, 16, 36, 2, 30, 4, 6, 16, 45, 4, 80, 2, 108, 16, 6, 2, 210, 24, 12, 32, 18, 4, 1008, 2, 45, 64, 12, 48, 8400, 4, 18, 16, 2268, 4, 240, 2, 90, 512, 18, 2, 3150, 32, 216, 64, 540, 4, 160, 144, 2430, 32, 12, 2, 166320, 4, 6, 1280, 405, 48, 1344
Offset: 1

Views

Author

Amiram Eldar, Nov 15 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := GCD[Times @@ ((d = Divisors[n]) + 1), Times @@ (Rest@ d - 1)]; Array[a, 70]
  • PARI
    a(n) = if(n == 1, 1, my(d = divisors(n)); gcd(prod(k=1, #d, d[k]+1), prod(k=2, #d, d[k]-1)));

Formula

a(n) = 2 if and only if n = 6 or n is a prime of the form 4*k+3 (A002145).
a(n) = 4 if and only if n is a prime of the form 4*k+1 (A002144).
a(n) == 1 (mod 2) if and only if n is a power of 2 (A000079).