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.

A055050 Numbers of the form 4^i*(8*j+3) or 4^i*(8*j+7).

Original entry on oeis.org

3, 7, 11, 12, 15, 19, 23, 27, 28, 31, 35, 39, 43, 44, 47, 48, 51, 55, 59, 60, 63, 67, 71, 75, 76, 79, 83, 87, 91, 92, 95, 99, 103, 107, 108, 111, 112, 115, 119, 123, 124, 127, 131, 135, 139, 140, 143, 147, 151, 155, 156, 159, 163, 167, 171, 172
Offset: 1

Views

Author

N. J. A. Sloane, Jun 02 2000

Keywords

Comments

The numbers not of the form x^2+y^2+4z^2.
Positions of 3 in A065882. - Clark Kimberling, Oct 19 2016
The asymptotic density of this sequence is 1/3. - Amiram Eldar, Mar 08 2021

Programs

  • Mathematica
    t = Table[Mod[n/4^IntegerExponent[n, 4], 4], {n, 1, 160}] (*A065882*)
    Flatten[Position[t, 3]] (*A055050*) (* Clark Kimberling, Oct 19 2016 *)
  • Python
    def A055050(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(((m:=x>>(i<<1))-3>>3)+(m-7>>3)+2 for i in range((x.bit_length()>>1)+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 21 2025