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 A000401 #45 Jul 02 2025 16:01:53 %S A000401 0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,26, %T A000401 27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51, %U A000401 52,53,54,55,57,58,59,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76 %N A000401 Numbers of form x^2 + y^2 + 2*z^2. %C A000401 Numbers represented by quadratic form with Gram matrix [ 1, 0, 0; 0, 1, 0; 0, 0, 2 ]. %C A000401 These are the numbers not of the form 4^k*(16*m + 14). [Dickson] - _Everett W. Howe_, May 18 2008 %C A000401 The asymptotic density of this sequence is 11/12. - _Amiram Eldar_, Mar 29 2025 %D A000401 Wacław Sierpiński, Elementary Theory of Numbers, (Ed. A. Schinzel), North-Holland, 1988, see Exercise 4 on p. 395. %H A000401 T. D. Noe, <a href="/A000401/b000401.txt">Table of n, a(n) for n = 1..1000</a> %H A000401 L. E. Dickson, <a href="https://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. %H A000401 Gabriele Nebe and N. J. A. Sloane, <a href="http://www.math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/tetragonalP.html">Home page for this lattice</a>. %p A000401 L := [seq(0,i=1..1)]: for x from 0 to 20 do for y from 0 to 20 do for z from 0 to 20 do if member(x^2+y^2+2*z^2, L)=false then L := [op(L), x^2+y^2+2*z^2] fi: od: od: od: L2 := sort(L): for i from 1 to 100 do printf(`%d,`,L2[i]) od: %t A000401 q=16;imax=q^2;Select[Union[Flatten[Table[x^2+y^2+2*z^2,{z,0,q},{y,0,q},{x,0,q}]]],#<=imax&] (* _Vladimir Joseph Stephan Orlovsky_, Apr 19 2011 *) %t A000401 Select[Range[0, 100], Mod[# / 4^IntegerExponent[#, 4], 16] != 14 &] (* _Amiram Eldar_, Mar 29 2025 *) %o A000401 (Python) %o A000401 def A000401(n): %o A000401 def f(x): return n-1+sum(((x>>i)-7>>3)+1 for i in range(1,x.bit_length(),2)) %o A000401 m, k = n, f(n) %o A000401 while m != k: m, k = k, f(k) %o A000401 return m # _Chai Wah Wu_, Feb 24 2025 %Y A000401 Complement of A055039. %K A000401 nonn,easy %O A000401 1,3 %A A000401 _N. J. A. Sloane_ %E A000401 More terms from _James Sellers_, May 31 2000