%I #27 Feb 14 2025 17:25:36
%S 5,7,13,15,20,21,23,28,29,31,37,39,45,47,52,53,55,60,61,63,69,71,77,
%T 79,80,84,85,87,92,93,95,101,103,109,111,112,116,117,119,124,125,127,
%U 133,135,141,143,148,149,151,156,157,159,165,167,173,175
%N Numbers of the form 4^i*(8j+7) or 4^i*(8j+5).
%C Numbers not of the form x^2+2y^2+8z^2.
%C The integers that are ratios between the terms constitute the sequence's complement within A003159. - _Peter Munn_, Feb 07 2024
%C The asymptotic density of this sequence is 1/3. - _Amiram Eldar_, Feb 09 2024
%H Amiram Eldar, <a href="/A055052/b055052.txt">Table of n, a(n) for n = 1..10000</a>
%H 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).
%t Select[Range[200], MemberQ[{5, 7}, Mod[# / 4^IntegerExponent[#, 4], 8]] &] (* _Amiram Eldar_, Feb 09 2024 *)
%o (Python)
%o def A055052(n):
%o def bisection(f,kmin=0,kmax=1):
%o while f(kmax) > kmax: kmax <<= 1
%o kmin = kmax >> 1
%o while kmax-kmin > 1:
%o kmid = kmax+kmin>>1
%o if f(kmid) <= kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o return kmax
%o def f(x):
%o c = n+x
%o for i in range(x.bit_length()>>1):
%o m = x>>(i<<1)
%o c -= (m-5>>3)+(m-7>>3)+2
%o return c
%o return bisection(f,n,n) # _Chai Wah Wu_, Feb 14 2025
%Y Disjoint union of A004215 and A055045.
%Y Subsequence of A003159, A097700.
%K nonn,easy,changed
%O 1,1
%A _N. J. A. Sloane_, Jun 02 2000