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.

A344877 a(n) = gcd(n, A344875(n)), where A344875 is multiplicative with a(2^e) = 2^(1+e) - 1, and a(p^e) = p^e -1 for odd primes p.

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 6, 1, 4, 3, 2, 1, 6, 1, 2, 1, 14, 1, 6, 1, 1, 1, 2, 1, 4, 1, 2, 3, 20, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 6, 5, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 6, 1, 4, 1, 2, 1, 24, 1, 2, 3, 2, 1, 6, 1, 4, 1, 2, 1, 84, 1, 2, 1, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 1, 4, 1, 6, 1, 4, 3
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2021

Keywords

Crossrefs

Cf. A344875.
Cf. also A323409.

Programs

  • Mathematica
    f[2, e_] := 2^(e + 1) - 1; f[p_, e_] := p^e - 1; a[1] = 1; a[n_] := GCD[n, Times @@ f @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Jun 03 2021 *)
  • PARI
    A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
    A344877(n) = gcd(n, A344875(n));