login
A055052
Numbers of the form 4^i*(8j+7) or 4^i*(8j+5).
1
5, 7, 13, 15, 20, 21, 23, 28, 29, 31, 37, 39, 45, 47, 52, 53, 55, 60, 61, 63, 69, 71, 77, 79, 80, 84, 85, 87, 92, 93, 95, 101, 103, 109, 111, 112, 116, 117, 119, 124, 125, 127, 133, 135, 141, 143, 148, 149, 151, 156, 157, 159, 165, 167, 173, 175
OFFSET
1,1
COMMENTS
Numbers not of the form x^2+2y^2+8z^2.
The integers that are ratios between the terms constitute the sequence's complement within A003159. - Peter Munn, Feb 07 2024
The asymptotic density of this sequence is 1/3. - Amiram Eldar, Feb 09 2024
LINKS
L. J. Mordell, A new Waring's problem with squares of linear forms, Quart. J. Math., 1 (1930), 276-288 (see p. 283).
MATHEMATICA
Select[Range[200], MemberQ[{5, 7}, Mod[# / 4^IntegerExponent[#, 4], 8]] &] (* Amiram Eldar, Feb 09 2024 *)
PROG
(Python)
def A055052(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):
c = n+x
for i in range(x.bit_length()>>1):
m = x>>(i<<1)
c -= (m-5>>3)+(m-7>>3)+2
return c
return bisection(f, n, n) # Chai Wah Wu, Feb 14 2025
CROSSREFS
Disjoint union of A004215 and A055045.
Subsequence of A003159, A097700.
Sequence in context: A314313 A339921 A066980 * A314314 A314315 A047550
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 02 2000
STATUS
approved