# How to import a file for processing but not for displaying? [closed]

Here's my problem, I want to take what I have now for code

 N[
Sum[2/10^((n*(Floor[9/n] + 1) - 9)4), {n, 1, Floor[Sqrt[ 9]]}] +
Sum[ 2/(10^((n(Floor[9/n] + 1) - 9)4) (10^(n*4) - 1)),
{n, 1, Floor[Sqrt[ 9]]}] +
Sum[2/(10^((o^2 - o - 9)* 4)*(10^(o*4) - 1)),
{o, Floor[Sqrt[9]] + 1, 10}],
((10 + 1)^2 - 9)* 4];
AbsoluteTiming[Flatten[
Position[Partition[RealDigits[%][[1]], 4, 4, -1], {(0) .., 2}]]] + 9


and seperate it into two operations. I've read the documentation and it's helped me figure out how to write a file, but I've tried and have not been able to import the file for processeing during the second part without displaying some junk. I've successfully been able to do this,

N[
Sum[2/10^((n*(Floor[9/n] + 1) - 9)4), {n, 1, Floor[Sqrt[ 9]]}] +
Sum[ 2/(10^((n(Floor[9/n] + 1) - 9)4) (10^(n*4) - 1)),
{n, 1, Floor[Sqrt[ 9]]}] +
Sum[2/(10^((o^2 - o - 9)* 4)*(10^(o*4) - 1)),
{o, Floor[Sqrt[9]] + 1, 10}],
((10 + 1)^2 - 9)* 4] >> "testdd9-10"


and I have verified the file using

FilePrint["testdd9-10"]


but I have been unsucessful with the second part. I've tried,

Import["testdd9-10"];
AbsoluteTiming[Flatten[
Position[Partition[RealDigits[%][[1]], 4, 4, -1], {(0) .., 2}]]] + 9


This will be absolutely necessary for me to figure out how to do so that I may process large ranges of primes and sort out formats of numbers which are prime, like safe primes. I have a 6TB hard drive and I'm just itching to fill it.

• << "testdd9-10";, and seeing as you write testdd9-10 but are trying to import testdd9-20, PBCAK... – ciao Mar 28 '15 at 23:02
• @rasher a typo, I will fix – user24719 Mar 28 '15 at 23:15
• no,no the problem is not the typo . the problem is that the escape character splits the large number into sublists. see my solution below – penguin77 Mar 28 '15 at 23:22

Easy fix:

Export the result in the form ExpressionML
Here is the code.

 N[
Sum[2/10^((n*(Floor[9/n] + 1) - 9)4), {n, 1, Floor[Sqrt[ 9]]}] +
Sum[ 2/(10^((n(Floor[9/n] + 1) - 9)4) (10^(n*4) - 1)),
{n, 1, Floor[Sqrt[ 9]]}] +
Sum[2/(10^((o^2 - o - 9)* 4)*(10^(o*4) - 1)),
{o, Floor[Sqrt[9]] + 1, 10}],
((10 + 1)^2 - 9)* 4] // Export["testdd9-10", #, "ExpressionML"] &


Hint: For trouble shooting use

Import["testdd9-10"] // InputForm


but run your code without // InputForm to get a result you can use.

(PS: a 6Tb disk?, I am jealous,hi,hi,hi)

• Import["testdd9-10"] //ImputForm  ImputForm - is that some new/undocumented feature? ;-) – ciao Mar 28 '15 at 23:20
• I think he means InputForm with an n instead of an m – user24719 Mar 28 '15 at 23:25
• Sorry for typo, I have corrected. my fingers are freeeezing... – penguin77 Mar 28 '15 at 23:27
• @penquin77,This does not yield the intended result. Import["testdd9-10"] // InputForm AbsoluteTiming[Flatten[ Position[Partition[ RealDigits[%][[1]], 4, 4, -1], {(0) .., 2}]]] + 9 – user24719 Mar 28 '15 at 23:39
• @penquin77, Wait a minute, yes it does. BUT, it displays the decimal output afterward, that which I'm hoping to avoid displaying when I begin to deal with larger ranges – user24719 Mar 28 '15 at 23:45