<p>If it is real, then it probably has to do with how capital letters come before lower-case letters in the UTF-8/ASCII table.  Lower values = fewer bits.</p>

CC BY-SA 3.0
2013-05-13T10:54:52.827Z
You are correct. the link in jgm's comment explains it quite well.  What is strange though, is that an address that starts with two capitol letters is no more difficult than one that starts with one capital letter and then one lowercase letter. eg: 1AA and 1Aa are equal difficulty.
Do Not Track Me
CC BY-SA 3.0
2013-05-15T20:56:29.977Z
I don't know [C](https://github.com/samr7/vanitygen/blob/cd1a7282431dcf7e522777976aa18728ee5bb7be/pattern.c), but I am guessing that it's a rounding error.  Since each letter represents a different number, AA and Aa might be in the same general area of complexity but AA and Ab might not be.  You could work it out the exact complexity algebraically but (given the random luck involved in finding an answer) it probably doesn't matter.
Indolering
CC BY-SA 3.0
2013-05-17T19:48:56.903Z
To clarify the above, it "doesn't matter" in that comparing 3*x and 3^x doesn't make a whole lot of sense.  As x gets larger, the magnitude of difference between the two .  3*4 = 12 and 3^4 =81.
Indolering
CC BY-SA 3.0
2013-05-13T01:54:13.883Z
2013-05-13T01:54:13.883Z
Indolering
<p>I'm copying this from <a href="https://bitcointalk.org/index.php?topic=25804.msg828418#msg828418" rel="nofollow noreferrer">deepceleron's post</a> on bitcointalk:</p>

<blockquote>
  <p>The change happens at a particular address:</p>
  
  <p>prefix difficulty: 77178 1QLa <br>
  prefix difficulty: 78362 1QLb <br>
  prefix difficulty: 4553521 1QLc </p>
  
  <p>This is a quirk of how the 25-byte (50 digit hexadecimal) Bitcoin
  address is converted into Base58 (represented by numbers and letters),
  and the different maximum values that can be stored in 25 base256
  digits vs 34 base58 digits.</p>
  
  <p>The Bitcoin address in it's native binary form (that you never see) is
  25 bytes, it's parts are:<br>
  <strong>byte 0:</strong> Network ID Byte (0x00 for main
  bitcoin network)<br>
  <strong>byte 1-20:</strong> ripemd160 hash (20 bytes) of sha256 hash
  (32 bytes) of 0x04+public key (65 bytes)<br>
  <strong>byte 21-24:</strong> checksum: first
  four bytes of sha256 hash of sha256 hash of bytes 0-20 above</p>
  
  <p>This would be 50 hexadecimal characters long (base16), with a possible
  digit value between 0-F.</p>
  
  <p>We will ignore byte 0, it is always 0x00, and Base58 conversion always
  preserves this leading 0 byte by directly encoding it as a "1".</p>
  
  <p>That means the "vanity" part of the address is bytes 1-24, 24 bytes of
  random hash output, or 48 hexadecimal digits. The maximum value that
  this can be is 0x FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
  ffff ffff (the lower case "f"s are the checksum, and won't be all
  FFFFs for the maximum ripemd160 value.) We can guess from the output
  below that this maximum possible address value encoded in Base58
  becomes 1QLbxxxxxx.... something:</p>

<pre><code>1QLa8LNNFeYs7KJWvxMdR5YtRjkwtQtkyb
1QLabhman6ZQyz3musbqV1RjFmE3pyT29j
1QLaJHv2LCSYo8WgT9qPf4rdttduRGyozX
1QLarwzJCUWGuQEZ4uWPsYVz8N2P5XmeQU

1QLckWG2tx17suupYU2FfeWunTCZMuJKW
1QLcMk7NVLwvg8gw2ihJTuG8x7WLYCjMg
1QLcLr6AoN687CpH1JZnfeMmWvUka5NHX
1QLc47945bSCv4J1Z4yRuvUbtooQqmGJ1
1QLcU9NNxaqfvqMRXD8dFtL2SktL3YmBT
1QLc1D24uDbvy327MzifEChVvATAeDsbF
</code></pre>
  
  <p>See how the 1QLa addresses are full length, but the 1QLc addresses are
  one digit shorter? That is because the only way to have an address
  starting at 1QLc or greater is by having a binary address that is 59x
  smaller.</p>
</blockquote>

CC BY-SA 3.0
2013-06-04T05:08:33.103Z
Cory, I fixed the formatting on your post. Also, copying content from other sites is of dubious legality, since Stack Exchange re-licenses all of its content as Creative Commons. Still, good post!
Nick ODell
CC BY-SA 3.0
2013-06-04T05:02:50.523Z
2017-10-22T00:51:06.297Z
2017-10-22T00:51:06.297Z
Cory Benjamin
<p>I get a much lower length of time if i make the first character a capital letter instead of a lowercase letter, when trying to generate a public key with Vanitygen.</p>

<p>Shouldn't it be the same? Has anyone else experienced this? What is the math / logic behind this difference?</p>

CC BY-SA 3.0
2013-05-12T15:30:25.973Z
possible duplicate of [How does vanitygen calculate difficulty?](http://bitcoin.stackexchange.com/questions/9408/how-does-vanitygen-calculate-difficulty)
jgm
<vanitygen>
Vanitygen: Why is it easier to generate an address that starts with a capital letter?
Do Not Track Me
# Vanitygen: Why is it easier to generate an address that starts with a capital letter?

(Asked by: username_0 on 2013-05-12)

I get a much lower length of time if i make the first character a capital letter instead of a lowercase letter, when trying to generate a public key with Vanitygen.

Shouldn't it be the same? Has anyone else experienced this? What is the math / logic behind this difference?

**Tags:** vanitygen

> **Comments:**
> **username_1**: possible duplicate of [How does vanitygen calculate difficulty?](http://bitcoin.stackexchange.com/questions/9408/how-does-vanitygen-calculate-difficulty)  

---

## 2 answers

### Answer by username_3 on 2013-06-04. Score: 6 | Accepted answer

I'm copying this from [deepceleron's post](https://bitcointalk.org/index.php?topic=25804.msg828418#msg828418) on bitcointalk:

> The change happens at a particular address:
>
> prefix difficulty: 77178 1QLa   
> prefix difficulty: 78362 1QLb   
> prefix difficulty: 4553521 1QLc
>
> This is a quirk of how the 25-byte (50 digit hexadecimal) Bitcoin
> address is converted into Base58 (represented by numbers and letters),
> and the different maximum values that can be stored in 25 base256
> digits vs 34 base58 digits.
>
> The Bitcoin address in it's native binary form (that you never see) is
> 25 bytes, it's parts are:  
> **byte 0:** Network ID Byte (0x00 for main
> bitcoin network)  
> **byte 1-20:** ripemd160 hash (20 bytes) of sha256 hash
> (32 bytes) of 0x04+public key (65 bytes)  
> **byte 21-24:** checksum: first
> four bytes of sha256 hash of sha256 hash of bytes 0-20 above
>
> This would be 50 hexadecimal characters long (base16), with a possible
> digit value between 0-F.
>
> We will ignore byte 0, it is always 0x00, and Base58 conversion always
> preserves this leading 0 byte by directly encoding it as a "1".
>
> That means the "vanity" part of the address is bytes 1-24, 24 bytes of
> random hash output, or 48 hexadecimal digits. The maximum value that
> this can be is 0x FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
> ffff ffff (the lower case "f"s are the checksum, and won't be all
> FFFFs for the maximum ripemd160 value.) We can guess from the output
> below that this maximum possible address value encoded in Base58
> becomes 1QLbxxxxxx.... something:
>
> ```
> 1QLa8LNNFeYs7KJWvxMdR5YtRjkwtQtkyb
> 1QLabhman6ZQyz3musbqV1RjFmE3pyT29j
> 1QLaJHv2LCSYo8WgT9qPf4rdttduRGyozX
> 1QLarwzJCUWGuQEZ4uWPsYVz8N2P5XmeQU
>
> 1QLckWG2tx17suupYU2FfeWunTCZMuJKW
> 1QLcMk7NVLwvg8gw2ihJTuG8x7WLYCjMg
> 1QLcLr6AoN687CpH1JZnfeMmWvUka5NHX
> 1QLc47945bSCv4J1Z4yRuvUbtooQqmGJ1
> 1QLcU9NNxaqfvqMRXD8dFtL2SktL3YmBT
> 1QLc1D24uDbvy327MzifEChVvATAeDsbF
>
> ```
>
> See how the 1QLa addresses are full length, but the 1QLc addresses are
> one digit shorter? That is because the only way to have an address
> starting at 1QLc or greater is by having a binary address that is 59x
> smaller.

> **Comments:**
> **username_4**: username_3, I fixed the formatting on your post. Also, copying content from other sites is of dubious legality, since Stack Exchange re-licenses all of its content as Creative Commons. Still, good post!  

---

### Answer by username_2 on 2013-05-13. Score: 1

If it is real, then it probably has to do with how capital letters come before lower-case letters in the UTF-8/ASCII table. Lower values = fewer bits.

> **Comments:**
> **username_0**: You are correct. the link in jgm's comment explains it quite well.  What is strange though, is that an address that starts with two capitol letters is no more difficult than one that starts with one capital letter and then one lowercase letter. eg: 1AA and 1Aa are equal difficulty.  
> **username_2**: I don't know [C](https://github.com/samr7/vanitygen/blob/cd1a7282431dcf7e522777976aa18728ee5bb7be/pattern.c), but I am guessing that it's a rounding error.  Since each letter represents a different number, AA and Aa might be in the same general area of complexity but AA and Ab might not be.  You could work it out the exact complexity algebraically but (given the random luck involved in finding an answer) it probably doesn't matter.  
> **username_2**: To clarify the above, it "doesn't matter" in that comparing 3*x and 3^x doesn't make a whole lot of sense.  As x gets larger, the magnitude of difference between the two .  3*4 = 12 and 3^4 =81.  

---

