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.

A052499 If n is in the sequence then so are 2n and 4n-1.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 11, 12, 14, 15, 16, 22, 23, 24, 27, 28, 30, 31, 32, 43, 44, 46, 47, 48, 54, 55, 56, 59, 60, 62, 63, 64, 86, 87, 88, 91, 92, 94, 95, 96, 107, 108, 110, 111, 112, 118, 119, 120, 123, 124, 126, 127, 128, 171, 172, 174, 175, 176, 182, 183, 184, 187
Offset: 0

Views

Author

Henry Bottomley, Mar 15 2000

Keywords

Comments

Theorem (J.-P. Allouche, J. Shallit, G. Skordev): This sequence = 1 + A003754.

Examples

			a(9)=14 is in the sequence because 14=2*(4*(2*1)-1).
		

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a052499 n = a052499_list !! n
    a052499_list = f $ singleton 1 where
       f s = m : f (insert (2*m) $ insert (4*m-1) s') where
          (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Jul 06 2011
    
  • Mathematica
    1 + Select[ Range[0, 200], FreeQ[ IntegerDigits[#, 2], {_, 0, 0, _} ] & ] (* Jean-François Alcover, Jan 20 2012, after J.-P. Allouche *)
    a[1] = 1; a[n_] := a[n] = a[n - 1] + Ceiling[2^IntegerExponent[a[n - 1], 2]/3]; Array[a, 200] (* Birkas Gyorgy, May 30 2012 *)
  • Python
    from itertools import count, islice
    def A052499_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n: not '00' in bin(n-1),count(max(startvalue,1)))
    A052499_list = list(islice(A052499_gen(),20)) # Chai Wah Wu, Feb 12 2025

Formula

a(A001911(n)) = 2^n.