By default the size of the string will be bigger as Sammaye described on comments. To formalize it:
Object.bsonsize({ "_id" : ObjectId("51b10b55f202d3fee925d637")}) = 22
Object.bsonsize({ "_id" : "51b10b55f202d3fee925d637"}) = 39
Object.bsonsize({ "_id" : "aaaaaaa"}) = 22
Object.bsonsize({ "_id" : 9999999999999998 }) = 18
So a 7 char long string has the same size as the ObjectId. If you use a number is smaller but you have to consider this:
What i found out which is really interesting while the typing is automatic in mongoshell that the conversion between the type of numbers is automatic. So basicaly the biggest number what you can store as an "integer" (at least the format) is 9999999999999998 which is strange a bit, while it should not relate to a decimal reprezentation (in fact the BSON datatype is a Double). All the numbers above are converted and rounded automatically to normal form for example :
{_id:9999999999999999}
Will stored as : 1e+16.0 and it a rounded value so when you try to insert :
insert({_id:10000000000000001})
E11000 duplicate key error index: $_id_ dup key: { : 1e+16.0 }
I am thinking about to submit a bug.
The situation even worth with the NumberLong() type which is the 64-bit integer BSON type:
> db.m.insert({_id: NumberLong(10000000000000001)})
E11000 duplicate key error index: t.m.$_id_ dup key: { : 10000000000000000 }
> db.m.insert({_id: NumberLong(10000000000000002)})
> db.m.insert({_id: NumberLong(10000000000000003)})
> db.m.insert({_id: NumberLong(10000000000000004)})
E11000 duplicate key error index: t.m.$_id_ dup key: { : 10000000000000004 }
> db.m.insert({_id: NumberLong(10000000000000005)})
E11000 duplicate key error index: t.m.$_id_ dup key: { : 10000000000000004 }
> db.m.insert({_id: NumberLong(10000000000000006)})
> db.m.insert({_id: NumberLong(10000000000000007)})
> db.m.insert({_id: NumberLong(10000000000000008)})
E11000 duplicate key error index: t.m.$_id_ dup key: { : 10000000000000008 }
> db.m.insert({_id: NumberLong(10000000000000009)})
E11000 duplicate key error index: t.m.$_id_ dup key: { : 10000000000000008 }
So you can use numbers which are smaller in storage size than the ObjectId but be careful.