login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A001637
Numbers with an even number of digits.
12
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 1000, 1001
OFFSET
1,1
COMMENTS
The lower and upper asymptotic densities of this sequence are 1/11 and 10/11, respectively. - Amiram Eldar, Feb 01 2021
FORMULA
A055642(a(n)) mod 2 = 0. - Reinhard Zumkeller, Jul 14 2014
a(n) = n + (100^floor(log_100(110*n)) - 1)/11. - Kevin Ryde, Nov 10 2022
MATHEMATICA
Select[Range[0, 1001], EvenQ[Length[IntegerDigits[#]]] &] (* T. D. Noe, Aug 09 2012 *)
PROG
(Haskell)
a001637 n = a001637_list !! (n-1)
a001637_list = filter (even . a055642) [0..]
-- Reinhard Zumkeller, Jul 14 2014
(PARI) is(n)=#Str(n)%2==0 \\ Charles R Greathouse IV, Nov 26 2018
(PARI) a(n) = n + 100^logint(110*n, 100) \ 11; \\ Kevin Ryde, Nov 10 2022
(Python)
def a(n): return n + (100**((len(str(110*n))-1)//2) - 1)//11
print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Nov 10 2022 after Kevin Ryde
CROSSREFS
Cf. A001633 (complement), A055642.
Sequence in context: A088475 A171891 A328075 * A308407 A102494 A117884
KEYWORD
nonn,base,easy
STATUS
approved