# Spacing control in export

While using, for example, the code

f[n_] := Plus @@ (Select[Range@n, GCD[#, n] == 1 &]^2);
a101 = Array[f, 50]
a102 = Transpose[{Range[1, 50], a101}]
Export["b053818.txt", a102, "Table"]


which is the MA code for Oeis sequence A053818. The exported data looks like:

1 1
2 1
3 5
4 10
5 30
6 26
7 91
8 84
9 159
10 140
11 385


Now, as seen, the spacing between the line indicator, first column, and the data, second column, is set to one space. The question is:

While viewing the MA code data exported in gedit the space is as seen and is one space. While viewing in Notepad and Wordpad the same space is seen as a tabbed space. How can this issue be resolved inside the MA code?

You can use the "FieldSeparators" option to specify what is used to separate fields:

ExportString[a102, "Table", "FieldSeparators" -> " . . . "]

1 . . . 1
2 . . . 1
3 . . . 5
4 . . . 10
5 . . . 30
6 . . . 26
7 . . . 91
8 . . . 84


I believe the default is a Tab, entered as "\t". How that is displayed by external software is a different issue.