Definitely not the best answer as it creates more information than needed and then scraps it, but possibly at least worth putting out there. The name is inspired by a certain spreadsheet program's way of labeling the columns when there are more than 26, as it is the same as here.
excelSequence[n_?Positive] := Flatten[
NestList[
Outer[StringJoin, Alphabet[], #] & (*Take the previous string and append each letter of the alphabet*),
Alphabet[],
Ceiling@Log[26, 25 n/26 + 1] - 1 (*smallest number of nestings needed*)
]
][[;; n]]
Minimal nestings
Since the Outer
gives us lists of length $26^k$ (after being flattened), and the NestList
tacks on the previous lists, the total length of the final list follows the geometric series
$$26^1 + 26^2 + 26^3 + \ldots + 26^{n_0} = \frac{26}{25} \left(26^{n_0}-1\right)$$
. Then, since NestList
needs to undergo an integer number of nestings $n_0 - 1$ (e.g. 0 nestings gives the alphabet) and we need at least the input number $n$ of elements, our goal is to find $n_0$ such that $n \leq \frac{26}{25} \left(26^{n_0}-1\right) \implies \log _{26}\left(\frac{25 n}{26}+1\right) \leq n_0$. Now we don't want any more information than we have to have with this method, so we choose the smallest integer $n_0$ such that $\log _{26}\left(\frac{25 n}{26}+1\right) \leq n_0$, which is the ceiling of left side of the inequality. So the smallest amount of nestings needed is $n_0 = \left\lceil \log _{26}\left(\frac{25 n}{26}+1\right)\right\rceil$.
Efficiency
Due to the nesting nature, a lot of extra information can first be produced and then deleted, making this method possibly very inefficient depending on the input. That being said, it reaches peak efficiency (because no information is deleted) when inputting terms in the geometric series: $\{26,702,18278,475254, ..., \frac{26}{25} \left(26^n-1\right)\}$, where it reaches minimal efficiency when using inputs just above these terms because the algorithm needs to generate the next power of 26 elements and then delete all but one.
Examples
excelSequence[10]
{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"}
excelSequence[100]
{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"aa", "ab", "ac", "ad", "ae", "af", "ag", "ah", "ai", "aj", "ak",
"al", "am", "an", "ao", "ap", "aq", "ar", "as", "at", "au", "av",
"aw", "ax", "ay", "az", "ba", "bb", "bc", "bd", "be", "bf", "bg",
"bh", "bi", "bj", "bk", "bl", "bm", "bn", "bo", "bp", "bq", "br",
"bs", "bt", "bu", "bv", "bw", "bx", "by", "bz", "ca", "cb", "cc",
"cd", "ce", "cf", "cg", "ch", "ci", "cj", "ck", "cl", "cm", "cn",
"co", "cp", "cq", "cr", "cs", "ct", "cu", "cv"}
excelSequence[1000] // Short
{a,b,c,d,e,f,g,h,i,j,<<981>>,ald,ale,alf,alg,alh,ali,alj,alk,all}
And because I know you're curious
RepeatedTiming@excelSequence[10^5] // Short
{0.187,{a,b,c,d,<<99992>>,eqxa,eqxb,eqxc,eqxd}}
BaseForm[n,26]
? Then you need to remove the superscript, turn into a string and replace $1,2,...,a,...p$ with $a,b,...,z$. Looks easier than the other answers? Unless I'm missing something $\endgroup$1,2,...,a,...p
witha,b,...,z
'. But yeah I agree that it doesn't work to display everything you want in the left column $\endgroup$