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).

This page as a plain text file.
%I A055043 #25 Apr 21 2025 23:05:26
%S A055043 6,22,24,38,54,70,86,88,96,102,118,134,150,152,166,182,198,214,216,
%T A055043 230,246,262,278,280,294,310,326,342,344,352,358,374,384,390,406,408,
%U A055043 422,438,454,470,472,486,502,518,534,536,550,566,582,598
%N A055043 Numbers of the form 2^(2i+1)*(8*j+3).
%C A055043 The asymptotic density of this sequence is 1/12. - _Amiram Eldar_, Mar 29 2025
%H A055043 Amiram Eldar, <a href="/A055043/b055043.txt">Table of n, a(n) for n = 1..10000</a>
%H A055043 L. J. Mordell, <a href="https://doi.org/10.1093/qmath/os-1.1.276">A new Waring's problem with squares of linear forms</a>, Quart. J. Math., 1 (1930), 276-288 (see p. 283).
%F A055043 a(n) = 2*A055046(n). - _Chai Wah Wu_, Mar 19 2025
%t A055043 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 *)
%o A055043 (Python)
%o A055043 def A055043(n):
%o A055043     def bisection(f,kmin=0,kmax=1):
%o A055043         while f(kmax) > kmax: kmax <<= 1
%o A055043         kmin = kmax >> 1
%o A055043         while kmax-kmin > 1:
%o A055043             kmid = kmax+kmin>>1
%o A055043             if f(kmid) <= kmid:
%o A055043                 kmax = kmid
%o A055043             else:
%o A055043                 kmin = kmid
%o A055043         return kmax
%o A055043     def f(x): return n+x-sum(((x>>(i<<1)+1)-3>>3)+1 for i in range(x.bit_length()-1>>1))
%o A055043     return bisection(f,n,n) # _Chai Wah Wu_, Mar 19 2025
%Y A055043 Cf. A055046.
%K A055043 nonn,easy
%O A055043 1,1
%A A055043 _N. J. A. Sloane_, Jun 01 2000