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.
%I A055042 #28 Apr 21 2025 23:05:21 %S A055042 10,26,40,42,58,74,90,104,106,122,138,154,160,168,170,186,202,218,232, %T A055042 234,250,266,282,296,298,314,330,346,360,362,378,394,410,416,424,426, %U A055042 442,458,474,488,490,506,522,538,552,554,570,586,602,616 %N A055042 Numbers of the form 2^(2i+1)*(8*j+5). %C A055042 These are also the numbers not of the form x^2+2y^2+3z^2. %C A055042 The asymptotic density of this sequence is 1/12. - _Amiram Eldar_, Mar 29 2025 %D A055042 Burton W. Jones, The Arithmetic of Quadratic Forms, Carus Monograph 10, Math. Assoc. America, 1967; Problem 60, p. 204. %H A055042 David A. Corneth, <a href="/A055042/b055042.txt">Table of n, a(n) for n = 1..10000</a> %H A055042 L. J. Mordell, <a href="http://dx.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 A055042 a(n) = 2*A055045(n). - _Chai Wah Wu_, Mar 19 2025 %e A055042 42 = 21*2 = 2^(2*0 + 1)*(8*2 + 5) is in the sequence. - _David A. Corneth_, Apr 18 2021 %t A055042 With[{max = 700}, Flatten[Table[2^(2*i + 1)*(8*j + 5), {i, 0, (Log2[max] - 1)/2}, {j, 0, Floor[(max/2^(2*i + 1) - 5)/8]}]] // Sort] (* _Amiram Eldar_, Mar 29 2025 *) %o A055042 (PARI) upto(n) = { my(res = List()); for(i = 0, logint(n\2, 2), forstep(j = 5, n>>(2*i+1), 8, listput(res, 4^i*2*j) ) ); Set(res) } \\ _David A. Corneth_, Apr 18 2021 %o A055042 (Python) %o A055042 def A055042(n): %o A055042 def bisection(f,kmin=0,kmax=1): %o A055042 while f(kmax) > kmax: kmax <<= 1 %o A055042 kmin = kmax >> 1 %o A055042 while kmax-kmin > 1: %o A055042 kmid = kmax+kmin>>1 %o A055042 if f(kmid) <= kmid: %o A055042 kmax = kmid %o A055042 else: %o A055042 kmin = kmid %o A055042 return kmax %o A055042 def f(x): return n+x-sum(((x>>(i<<1)+1)-5>>3)+1 for i in range(x.bit_length()-1>>1)) %o A055042 return bisection(f,n,n) # _Chai Wah Wu_, Mar 19 2025 %Y A055042 Cf. A055045. %K A055042 nonn,easy %O A055042 1,1 %A A055042 _N. J. A. Sloane_, Jun 01 2000