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 A055045 #55 Mar 20 2025 08:53:10 %S A055045 5,13,20,21,29,37,45,52,53,61,69,77,80,84,85,93,101,109,116,117,125, %T A055045 133,141,148,149,157,165,173,180,181,189,197,205,208,212,213,221,229, %U A055045 237,244,245,253,261,269,276,277,285,293,301,308,309,317,320,325,333,336,340,341 %N A055045 Numbers of the form 4^i*(8*j+5). %C A055045 Numbers not of the form x^2+2y^2+6z^2. %H A055045 Reinhard Zumkeller, <a href="/A055045/b055045.txt">Table of n, a(n) for n = 1..10000</a> %H A055045 L. E. Dickson, <a href="http://dx.doi.org/10.1090/S0002-9904-1927-04312-9">Integers represented by positive ternary quadratic forms</a>, Bull. Amer. Math. Soc. 33 (1927), 63-70. See Theorem XI. %H A055045 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 A055045 a(n) = 6n + O(log n). - _Charles R Greathouse IV_, Dec 19 2013 %F A055045 a(n) = A055042(n)/2. - _Chai Wah Wu_, Mar 19 2025 %t A055045 A055045Q[k_] := Mod[k/4^IntegerExponent[k, 4], 8] == 5; %t A055045 Select[Range[500], A055045Q] (* _Paolo Xausa_, Mar 20 2025 *) %o A055045 (PARI) is(n)=n/=4^valuation(n,4); n%8==5 \\ _Charles R Greathouse IV_ and _V. Raman_, Dec 19 2013 %o A055045 (Haskell) %o A055045 a055045 n = a055045_list !! (n-1) %o A055045 a055045_list = filter ((== 5) . (flip mod 8) . f) [1..] where %o A055045 f x = if r == 0 then f x' else x where (x', r) = divMod x 4 %o A055045 -- _Reinhard Zumkeller_, Jan 02 2014 %o A055045 (Python) %o A055045 from itertools import count, islice %o A055045 def A055045_gen(startvalue=1): # generator of terms >= startvalue %o A055045 return filter(lambda n:not (m:=(~n&n-1).bit_length())&1 and (n>>m)&7==5, count(max(startvalue, 1))) %o A055045 A055045_list = list(islice(A055045_gen(), 30)) # _Chai Wah Wu_, Jul 09 2022 %o A055045 (Python) %o A055045 def A055045(n): %o A055045 def bisection(f,kmin=0,kmax=1): %o A055045 while f(kmax) > kmax: kmax <<= 1 %o A055045 kmin = kmax >> 1 %o A055045 while kmax-kmin > 1: %o A055045 kmid = kmax+kmin>>1 %o A055045 if f(kmid) <= kmid: %o A055045 kmax = kmid %o A055045 else: %o A055045 kmin = kmid %o A055045 return kmax %o A055045 def f(x): return n+x-sum(((x>>(i<<1))-5>>3)+1 for i in range(x.bit_length()>>1)) %o A055045 return bisection(f,n,n) # _Chai Wah Wu_, Feb 14 2025 %Y A055045 Cf. A004215, A055042, A055046, A234000. %K A055045 nonn,easy %O A055045 1,1 %A A055045 _N. J. A. Sloane_, Jun 01 2000