3
$\begingroup$

I am looking to compute the value of $\sum^{3249}_{n=58} 2^{n \choose 2}$, but when I try to execute ScientificForm[Sum[2^Binomial[n, 2], {n, 58, 3249}]], I get a very large output.

Why is ScientificForm not being applied?

$\endgroup$
9
$\begingroup$

The result of that sum is an (exact) integer, so Mathematica will display every digit because they're all significant. To get the output you're looking for, you just have to convert the result to a floating point number using N.

ScientificForm[N@Sum[2^Binomial[n, 2], {n, 58, 3249}]]
$\endgroup$
3
$\begingroup$

Large Real numbers are styled in ScientificForm by default, therefore all you need is N:

N @ Sum[2^Binomial[n, 2], {n, 58, 3249}]

2.782284487984395 x 101588347

If you want to automatically display large Integer numbers in the same form you could use an assignment to $PrePrint, among other options. This does not affect the internal value of expressions.

$PrePrint = # /. i_Integer /; i > 1*^50 :> N[i] &;

s = Sum[2^Binomial[n, 2], {n, 58, 3249}]

2.782284487984395 x 101588347

Head[s]

Integer

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.