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.

A058250 GCD of n-th primorial number and its totient.

Original entry on oeis.org

1, 1, 2, 2, 6, 30, 30, 30, 30, 330, 2310, 2310, 2310, 2310, 2310, 53130, 690690, 20030010, 20030010, 20030010, 20030010, 20030010, 20030010, 821230410, 821230410, 821230410, 821230410, 13960916970, 739928599410, 739928599410
Offset: 0

Views

Author

Labos Elemer, Dec 05 2000

Keywords

Examples

			a(6) = gcd(30030,5760) = 30.
		

Crossrefs

Programs

  • Maple
    [seq(igcd(product(ithprime(k), k=1..m), product(ithprime(k)-1, k=1..m)), m=1..50)];
  • Mathematica
    GCD[#,EulerPhi[#]]&/@Rest[FoldList[Times,1,Prime[Range[30]]]] (* Harvey P. Dale, Dec 19 2012 *)
    Fold[Append[#1, {#1, #2, GCD[#1, #2]} & @@ {#4 #1, #2 (#4 - 1)} & @@ Append[#1[[-1]], #2]] &, {{1, 1, 1}}, Prime@ Range[29]][[All, -1]] (* Michael De Vlieger, Apr 25 2019 *)
  • PARI
    a(n) = my(pr=prod(k=1, n, prime(k))); gcd(pr, eulerphi(pr)); \\ Michel Marcus, Apr 13 2019

Formula

a(n) = gcd(A002110(n), A000010(A002110(n))) = gcd(A002110(n), A005867(n)).
a(n) = A005867(n) / A038110(n+1). For example: For n = 4: a(4) = 48 / 8 = 6. - Jamie Morken, Apr 12 2019

Extensions

a(0) = 1 inserted by Michael De Vlieger, Apr 13 2019