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.

A055043 Numbers of the form 2^(2i+1)*(8*j+3).

Original entry on oeis.org

6, 22, 24, 38, 54, 70, 86, 88, 96, 102, 118, 134, 150, 152, 166, 182, 198, 214, 216, 230, 246, 262, 278, 280, 294, 310, 326, 342, 344, 352, 358, 374, 384, 390, 406, 408, 422, 438, 454, 470, 472, 486, 502, 518, 534, 536, 550, 566, 582, 598
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2000

Keywords

Comments

The asymptotic density of this sequence is 1/12. - Amiram Eldar, Mar 29 2025

Crossrefs

Cf. A055046.

Programs

  • Mathematica
    f[upto_]:=Module[{maxi=Floor[(Log[2,upto]-1)/2],maxj= Floor[(upto-3)/8],s},s=2^(2First[#]+1) (8Last[#]+3)&/@ Tuples[{Range[0,maxi], Range[0,maxj]}];Union[Select[s,#<=upto&]]]; f[700]  (* Harvey P. Dale, Mar 23 2011 *)
  • Python
    def A055043(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(((x>>(i<<1)+1)-3>>3)+1 for i in range(x.bit_length()-1>>1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 19 2025

Formula

a(n) = 2*A055046(n). - Chai Wah Wu, Mar 19 2025