MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Product of the first 1000th Prime

  • To: mathgroup at
  • Subject: [mg23086] Re: [mg23026] Product of the first 1000th Prime
  • From: Andrzej Kozlowski <andrzej at>
  • Date: Sat, 15 Apr 2000 03:00:43 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

on 4/12/00 12:18 PM, Antoine Bruguier at antoine.bruguier at wrote:

> Hi,
> I would like to have a text file with the product of the first 1000th
> prime number. Moreover, it would like to have this numbre displayed in
> hexadecimal.
> Thanks a lot,
> Antoine

You can get your number at once with

BaseForm[Product[Prime[n], {n, 1, 1000}], 16]

If you want to have it in a text file one thing you can do is something like

temp = OpenWrite["file.txt", FormatType -> OutputForm]

Write[temp, BaseForm[Product[Prime[n], {n, 1, 1000}], 16]]


This will produce a text file file.txt in your current Directory[],
containing the number you want in something resembling Mathematica's output
form. I suspect this is not exactly the form you want (it will contain the
character / at every line-break and a subscript 16 at the end to remind you
that you have an expression in base 16) but you can easily edit it in your
text editor. This seems easier than writing a program to produce just the a
long line of hexadecimal digits.

  • Prev by Date: vector union
  • Next by Date: Re: Add Fonts when using Display[]
  • Previous by thread: RE: Product of the first 1000th Prime
  • Next by thread: Re: Product of the first 1000th Prime