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 A089048 #16 Jul 20 2023 07:19:21 %S A089048 0,0,0,1,1,1,2,1,1,1,2,1,2,1,1,0,1,1,2,1,2,1,1,0,2,1,1,0,1,0,0,0,1,1, %T A089048 2,1,2,1,1,0,2,1,1,0,1,0,0,0,2,1,1,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,2,1, %U A089048 2,1,1,0,2,1,1,0,1,0,0,0,2,1,1,0,1,0,0,0,1,0,0,0,0,0,0,0,2,1,1,0,1,0,0,0,1 %N A089048 Number of ways of writing n as a sum of exactly 3 powers of 2. %C A089048 The powers do not need to be distinct. %H A089048 Amiram Eldar, <a href="/A089048/b089048.txt">Table of n, a(n) for n = 0..10000</a> %F A089048 For n > 2: a(n) = (1 + (1 - A000120(n) mod 2)*(1 - n mod 2)) * 0^floor(A000120(n)/4). - _Reinhard Zumkeller_, Dec 14 2003 %p A089048 f := proc(n,k) option remember; if k > n then RETURN(0); fi; if k= 0 then if n=0 then RETURN(1) else RETURN(0); fi; fi; if n mod 2 = 1 then RETURN(f(n-1,k-1)); fi; f(n-1,k-1)+f(n/2,k); end; # present sequence is f(n,3) %t A089048 a[n_] := If[n < 3, 0, ((1 - Mod[n, 2])*(1 - Mod[DigitCount[n, 2, 1], 2]) + 1)*If[Floor[(1/4)*DigitCount[n, 2, 1]] == 0, 1, 0]]; %t A089048 Table[a[n], {n, 0, 104}] (* _Jean-François Alcover_, Feb 13 2018, after _Reinhard Zumkeller_ *) %Y A089048 A column of A089052. %Y A089048 Cf. A000120, A036987, A075897, A089049, A089050, A089051, A089053. %K A089048 nonn %O A089048 0,7 %A A089048 _N. J. A. Sloane_, Dec 03 2003