Re: Strange 26base enumeration

• To: mathgroup at smc.vnet.net
• Subject: [mg111204] Re: Strange 26base enumeration
• From: Norbert Marxer <marxer at mec.li>
• Date: Fri, 23 Jul 2010 07:13:42 -0400 (EDT)
• References: <i293lk\$m1e\$1@smc.vnet.net>

```On Jul 22, 11:40 am, "Dr Bruno Campanini" <cmp... at gmail.com> wrote:
> I need an algorithm to get such a table:
>
> A
> B
> .
> .
> Z
> AA
> AB
> .
> .
> AZ
> BA
> BB
> .
> .
> BZ
> CA
> .
> .
> ZA
> ZB
> .
> .
> ZZ
> AAA
> AAB
> .
> .
> AAZ
> ABA
> .
> .
> ABZ
> .
> AZA
> .
> AZZ
> BAA
> .
> ZZZ
> AAAA
> AAAB
> .
> .
> ZZZZ
> AAAAA
> AAAAB
> .
>
> Any idea?
>
> Bruno

Hello

You can use:

Table[StringJoin /@ Tuples[FromCharacterCode /@ Range[65, 90],
i], {i,1, 5}] // Flatten // Column;

The output has been suppressed because the output is very large. But
you can check the output using only the letters A, B and C:

Table[StringJoin /@ Tuples[FromCharacterCode /@ Range[65, 67], i],
{i,1, 5}] // Flatten // Column

Note that this produces a list of strings. You can convert the strings
to symbols using ToExpression:

Table[StringJoin /@ Tuples[FromCharacterCode /@ Range[65, 67],
i] // ToExpression, {i, 1, 5}] // Flatten // Column

Best Regards
Norbert Marxer

```

• Prev by Date: Re: Strange 26base enumeration
• Next by Date: Re: Very very basic question about Mathematica expressions
• Previous by thread: Re: Strange 26base enumeration
• Next by thread: Re: Strange 26base enumeration