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.

A062289 Numbers n such that n-th row in Pascal triangle contains an even number, i.e., A048967(n) > 0.

Original entry on oeis.org

2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 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, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 02 2001

Keywords

Comments

Numbers n such that binary representation contains the bit string "10". Union of A043569 and A101082. - Rick L. Shepherd, Nov 29 2004
The asymptotic density of this sequence is 1 (Burns, 2016). - Amiram Eldar, Jan 26 2021

Crossrefs

Complement of A000225, so these might be called non-Mersenne numbers.
A132782 is a subsequence.

Programs

  • Haskell
    a062289 n = a062289_list !! (n-1)
    a062289_list = 2 : g 2 where
       g n = nM n : g (n+1)
       nM k = maximum $ map (\i -> i + min i (a062289 $ k-i+1)) [2..k]
       -- Cf. link [Oliver Kullmann, Xishun Zhao], Def. 3.1, page 3.
    -- Reinhard Zumkeller, Feb 21 2012, Dec 31 2010
    
  • Mathematica
    ok[n_] := MatchQ[ IntegerDigits[n, 2], {_, 1, 0, _}]; Select[ Range[100], ok] (* Jean-François Alcover, Dec 12 2011, after Rick L. Shepherd *)
  • PARI
    isok(m) = #select(x->((x%2)==0), vector(m+1, k, binomial(m, k-1))); \\ Michel Marcus, Jan 26 2021
    
  • Python
    def A062289(n): return n+(m:=n.bit_length())-(not n>=(1<Chai Wah Wu, Jun 30 2024

Formula

a(n) = A057716(n+1) - 1.
a(n) = 2 if n=1, otherwise max{min{2*i, a(n-i+1) + i}: 1 < i <= n}.
A036987(a(n)) = 0. - Reinhard Zumkeller, Mar 06 2012
A007461(a(n)) mod 2 = 0. - Reinhard Zumkeller, Apr 02 2012
A102370(n) = A105027(a(n)). - Reinhard Zumkeller, Jul 21 2012
A261461(a(n)) = A261922(a(n)). - Reinhard Zumkeller, Sep 17 2015

Extensions

More terms from Rick L. Shepherd, Nov 29 2004