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.

A066838 Product of primes < n that do not divide n.

Original entry on oeis.org

1, 1, 2, 3, 6, 5, 30, 105, 70, 21, 210, 385, 2310, 2145, 2002, 15015, 30030, 85085, 510510, 969969, 461890, 440895, 9699690, 37182145, 44618574, 8580495, 74364290, 15935205, 223092870, 215656441, 6469693230, 100280245065
Offset: 1

Views

Author

Leroy Quet, Jan 20 2002

Keywords

Examples

			a(8) = 105 = 3 * 5 * 7 because 3, 5 and 7 are the primes < 8 that do not divide 8.
		

Crossrefs

Cf. A002110 (primorial numbers).

Programs

  • Maple
    Primes:= select(isprime, [$2..100]):
    seq(convert(select(t -> t <= n and n mod t <> 0, Primes),`*`), n=1..100); # Robert Israel, Jun 19 2016
  • Mathematica
    Table[Apply[Times, Select[Prime@ Range@ PrimePi@ n, CoprimeQ[#, n] &] /. {} -> 1], {n, 32}] (* or *)
    Table[E^Sum[(1 - Floor[n/k] + Floor[(n - 1)/k]) Boole@ PrimeQ[k] MangoldtLambda@ k, {k, 2, n}], {n, 32}] (* Michael De Vlieger, Jun 22 2016 *)
    Table[Times@@Complement[Prime[Range[PrimePi[n]]],FactorInteger[n][[All,1]]],{n,40}] (* Harvey P. Dale, Feb 05 2022 *)
  • PARI
    a(n) = prod(i=1, n-1, if (isprime(i) && (n%i) , i, 1)); \\ Michel Marcus, May 20 2014

Formula

a(prime(n)) = A002110(n-1). - Michel Marcus, May 20 2014
a(n) = e^[Sum_{k=2..n} (1-floor(n/k)+floor((n-1)/k))*A010051(k)*M(k)] where M(n) is the Mangoldt function. - Anthony Browne, Jun 17 2016