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.

A094521 a(n) = gcd(n, A094457(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 5, 8, 1, 6, 1, 4, 3, 2, 1, 8, 5, 2, 9, 4, 1, 10, 1, 16, 11, 2, 5, 12, 1, 2, 3, 8, 1, 6, 1, 4, 15, 2, 1, 16, 7, 10, 3, 4, 1, 18, 5, 8, 3, 2, 1, 20, 1, 2, 9, 32, 5, 22, 1, 4, 3, 10, 1, 24, 1, 2, 25, 4, 11, 6, 1, 16, 27, 2, 1, 12, 5, 2, 3, 8, 1, 30, 7, 4, 3, 2, 5, 32, 1
Offset: 2

Views

Author

Marc LeBrun, May 06 2004

Keywords

Examples

			a(18) = gcd(18,12) = 6.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{g, h}, g[x_] := Flatten[Table[#1, {#2}] & @@@ FactorInteger@ x]; h[x_] := If[x == 2, 1, NextPrime[x, -1]]; If[n == 1, 1, Max[Times @@ MapAt[h, g[n], #] & /@ Range[Length@ g[n]]]]]; Table[GCD[i, f@ i], {i, 2, 74}] (* Michael De Vlieger, Jan 31 2015 *)