cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A001637 Numbers with an even number of digits.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/11 and 10/11, respectively. - Amiram Eldar, Feb 01 2021

Crossrefs

Cf. A001633 (complement), A055642.

Programs

  • Haskell
    a001637 n = a001637_list !! (n-1)
    a001637_list = filter (even . a055642) [0..]
    -- Reinhard Zumkeller, Jul 14 2014
    
  • Mathematica
    Select[Range[0, 1001], EvenQ[Length[IntegerDigits[#]]] &] (* T. D. Noe, Aug 09 2012 *)
  • 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

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