MathGroup Archive 2012

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

Search the Archive

Re: How to count

  • To: mathgroup at
  • Subject: [mg125719] Re: How to count
  • From: "Harvey P. Dale" <hpd1 at>
  • Date: Fri, 30 Mar 2012 04:31:50 -0500 (EST)
  • Delivered-to:
  • References: <>


	Your code requires computing n! twice for each n.  You might try
something like this instead:


But for large n, Mathematica cannot compute n! because of overflow.



-----Original Message-----
From: Artur [mailto:grafix at]
Sent: Thursday, March 29, 2012 3:55 AM
To: mathgroup at
Subject: [mg125719] How to count

Dear Mathematica Gurus!

I have seriously problem with counting distances between smallest square
bigger than n! (for big n) e.g.

aa = {}; Do[k = 1 + Floor[Sqrt[n!]]; kk = k^2 - n!; Print[kk];
  kkk = N[Log[kk], 100]; Print[kkk];
  AppendTo[aa, kkk], {n, 1, 10000000, 1000000}]; aa

Who have idea how to count this on Mathematica?

Best wishes

  • Prev by Date: Re: Manipulate[Plot[Evaluate[expr]]]
  • Next by Date: ChartElements in BarChart doesn't plot negatives any ideas?
  • Previous by thread: How to count
  • Next by thread: Re: How to count