and say we want to find a pattern "166". One of the solutions takes a form of a private key
B18427B169E86DE681A1A62588E1D02AE4A7E83C1B413849989A76282A7B562F
mapping to public key:
049C95E0949E397FACCECF0FE8EAD247E6FD082717E4A4A876049FB34A9ADED110DFEA2EF691CC4 A1410498F4C312F3A94318CD5B6F0E8E92051064876751C8404
Sorry for my terrible math, but how is that private key a solution to the pattern "166"? That private key makes the address 12gFLYWpfnDTQ3JB5w5VDPpF5JQZnA1g1c it doesn't have 166 in it. The math doesn't lie and if you add the two private keys together you do get an address with "166" in it, but where did this one come from? How would one do this with vanitygen?
Check out this page:
http://gobittest.appspot.com/VanityWhen you add
18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725
and
B18427B169E86DE681A1A62588E1D02AE4A7E83C1B413849989A76282A7B562F
their sum becomes
CA65722CD418ED28EC369E36CFE3B7F3CC1CD035BFBF6469CE759FCA30AD6D54
which maps to 166ev9JXn2rFqiPSQAwM7qJYpNL1JrNf3h
Currently you can't do these operations with vanitygen, but I'll look into making a tool for the generation soon.
Basically, one would need to make a modified vanitygen that would add a predefined public key to a generated keypair before proceeding with calculating the Bitcoin address. It's a fairly simple modification, but I'm not fluent enough in vanitygen's source code to make it.