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.

A173751 a(n) = gcd(n, lcm_{p is a prime divisor of n} (p-1)) = gcd(n, A173614(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 5, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 6, 1, 4, 1, 2, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 3
Offset: 1

Views

Author

Keywords

Comments

a(n) is divisor of A126864(n).

Examples

			84 = 2^2*3*7; lcm{p-1|p is prime and divisor of 84} = lcm{1,2,6} = 6; gcd(84,6) = 6 ==> a(84)=6.
		

Crossrefs

Cf. A173614.

Programs

  • Mathematica
    fa=FactorInteger; lcm[n_] := Module[{aux = 1, lon = Length[fa[n]]}, Do[aux = LCM[aux, (fa[n][[i]][[1]] - 1)], {i, lon}]; aux] a[n_] := GCD[lcm[n], n]; Table[a[n], {n, 1, 300}]
  • PARI
    a(n)=gcd(n, lcm(apply(p->p-1, factor(n)[,1]))) \\ Andrew Howroyd, Aug 06 2018