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.

A066570 Product of numbers <= n that have a prime factor in common with n.

This page as a plain text file.
%I A066570 #20 Nov 02 2017 15:30:38
%S A066570 1,2,3,8,5,144,7,384,162,19200,11,1244160,13,4515840,1458000,10321920,
%T A066570 17,75246796800,19,278691840000,1080203040,899245670400,23,
%U A066570 16686729658368000,375000,663152807116800,7142567040,209964381084057600,29,1229978843118305280000000
%N A066570 Product of numbers <= n that have a prime factor in common with n.
%C A066570 Empty product, 1, for n = 1.
%C A066570 a(p) = p if p is a prime.
%H A066570 T. D. Noe, <a href="/A066570/b066570.txt">Table of n, a(n) for n = 1..200</a>
%F A066570 a(n) = n!/A001783(n).
%F A066570 a(n) = Gauss_factorial(n, 1)/Gauss_factorial(n, n) (see A216919). - _Peter Luschny_, Oct 02 2012
%e A066570 a(7) = 7, a(9) = 3*6*9 = 162.
%p A066570 A066570 := proc(n) local i; mul(i,i=remove(k->igcd(n,k)=1,[$1..n])) end: # _Peter Luschny_, Oct 11 2011
%t A066570 Table[Times @@ Select[Range[2, n], GCD[#, n] > 1 &], {n, 30}] (* _T. D. Noe_, Oct 04 2012 *)
%o A066570 (Sage)
%o A066570 def Gauss_factorial(N, n): return mul(j for j in (1..N) if gcd(j, n) == 1)
%o A066570 def A066570(n): return Gauss_factorial(n, 1)/Gauss_factorial(n, n)
%o A066570 [A066570(n) for n in (1..30)] # _Peter Luschny_, Oct 02 2012
%o A066570 (PARI) a(n) = prod(k=1, n, if (gcd(k, n) != 1, k, 1)); \\ _Michel Marcus_, Nov 02 2017
%Y A066570 Cf. A001783, A216919.
%K A066570 nonn,easy
%O A066570 1,2
%A A066570 _Amarnath Murthy_, Dec 19 2001