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.

A306695 a(n) = gcd(n, psi(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 6, 1, 4, 3, 2, 1, 12, 1, 2, 3, 8, 1, 18, 1, 4, 1, 2, 1, 24, 5, 2, 9, 4, 1, 6, 1, 16, 3, 2, 1, 36, 1, 2, 1, 8, 1, 6, 1, 4, 9, 2, 1, 48, 7, 10, 3, 4, 1, 54, 1, 8, 1, 2, 1, 12, 1, 2, 3, 32, 1, 6, 1, 4, 3, 2, 1, 72, 1, 2, 15, 4, 1, 6, 1, 16, 27, 2, 1, 12, 1, 2, 3, 8, 1, 18, 7, 4, 1, 2, 5, 96, 1, 14, 9, 20
Offset: 1

Views

Author

Torlach Rush, Mar 05 2019

Keywords

Comments

Here psi(n) is Dedekind's psi function A001615.
a(n) <= n <= A001615(n).
a(n) = n iff a(n) * 2 = A001615(n), n > 1.
a(n) = 1 iff either n=2 or n is in A255602. - Robert Israel, Mar 12 2019

Crossrefs

Programs

  • Maple
    f:= proc(n) local p; igcd(n, n*mul(1+1/p, p=numtheory:-factorset(n))) end proc:
    map(f, [$1..100]); # Robert Israel, Mar 11 2019
  • Mathematica
    psi[n_] := If[n == 1, 1, n Times @@ (1 + 1/FactorInteger[n][[All, 1]])];
    a[n_] := GCD[n, psi[n]];
    Array[a, 100] (* Jean-François Alcover, Jun 08 2020 *)
  • PARI
    dpsi(n) = n * sumdivmult(n, d, issquarefree(d)/d); \\ A001615
    a(n) = gcd(n, dpsi(n)); \\ Michel Marcus, Mar 05 2019

Formula

a(n) = gcd(n, A001615(n)).