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.

A055046 Numbers of the form 4^i*(8*j+3).

This page as a plain text file.
%I A055046 #63 Mar 20 2025 08:53:15
%S A055046 3,11,12,19,27,35,43,44,48,51,59,67,75,76,83,91,99,107,108,115,123,
%T A055046 131,139,140,147,155,163,171,172,176,179,187,192,195,203,204,211,219,
%U A055046 227,235,236,243,251,259,267,268,275,283,291,299,300,304,307,315,323,331,332
%N A055046 Numbers of the form 4^i*(8*j+3).
%C A055046 Numbers not of the form x^2+y^2+5z^2.
%C A055046 Also values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 2 raised to an odd power. - _V. Raman_, Dec 18 2013
%H A055046 Paolo Xausa, <a href="/A055046/b055046.txt">Table of n, a(n) for n = 1..10000</a>
%H A055046 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 A055046 a(n) = 6n + O(log n). - _Charles R Greathouse IV_, Dec 19 2013
%F A055046 a(n) = A055043(n)/2. - _Chai Wah Wu_, Mar 19 2025
%t A055046 A055046Q[k_] := Mod[k/4^IntegerExponent[k, 4], 8] == 3;
%t A055046 Select[Range[500], A055046Q] (* _Paolo Xausa_, Mar 20 2025 *)
%o A055046 (PARI) is(n)=n/=4^valuation(n,4); n%8==3 \\ _Charles R Greathouse IV_ and _V. Raman_, Dec 19 2013
%o A055046 (Python)
%o A055046 from itertools import count, islice
%o A055046 def A055046_gen(startvalue=1): # generator of terms >= startvalue
%o A055046     return filter(lambda n:not (m:=(~n&n-1).bit_length())&1 and (n>>m)&7==3,count(max(startvalue,1)))
%o A055046 A055046_list = list(islice(A055046_gen(),30)) # _Chai Wah Wu_, Jul 09 2022
%o A055046 (Python)
%o A055046 def A055046(n):
%o A055046     def bisection(f,kmin=0,kmax=1):
%o A055046         while f(kmax) > kmax: kmax <<= 1
%o A055046         kmin = kmax >> 1
%o A055046         while kmax-kmin > 1:
%o A055046             kmid = kmax+kmin>>1
%o A055046             if f(kmid) <= kmid:
%o A055046                 kmax = kmid
%o A055046             else:
%o A055046                 kmin = kmid
%o A055046         return kmax
%o A055046     def f(x): return n+x-sum(((x>>(i<<1))-3>>3)+1 for i in range(x.bit_length()>>1))
%o A055046     return bisection(f,n,n) # _Chai Wah Wu_, Feb 14 2025
%Y A055046 Cf. A004215, A055043, A055045, A055047, A233998, A233999, A234000.
%K A055046 nonn,easy
%O A055046 1,1
%A A055046 _N. J. A. Sloane_, Jun 01 2000