login
A168650
Integers that can be generated with a C/C++ expression that is shorter than their decimal representation.
3
1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000
OFFSET
1,1
COMMENTS
From Dmitry Kamenetsky, Jul 24 2015: (Start)
By "expression" we mean a string representing a piece of code in C/C++ that evaluates to a positive integer, where we assume for simplicity that the result is converted to an integer using the floor operation. An expression can use the binary operators available in those languages and the digits '0' to '9', and we also allow "AeB" for A*10^B.
For example: "A+B" evaluates to A plus B, "A*B" evaluates to A multiplied by B, "A/B" is floor(A/B), "A<<B" is A*2^B.
This sequence lists every integer n having an expression whose length is strictly less than the decimal length of n; of course every integer n has an expression whose length is the same as the decimal length of n, namely "n". In some sense the numbers in this sequence can be considered simple, since they have a low Kolmogorov complexity.
We assume that there are no rounding errors or integer overflow during the evaluation of the expression.(End)
EXAMPLE
1000 has 4 digits, but it can be generated with a 3-digit expression "1e3". The integers 43000, 116666, 114688, 199997 are also in the sequence, since they can be generated using the expressions "43e3", "7e5/6", "7<<14", "2e5-3" respectively.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Dmitry Kamenetsky, Dec 01 2009
EXTENSIONS
Name clarified by Dmitry Kamenetsky, Jul 24 2015
STATUS
approved