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 A269735 #19 Jun 27 2022 07:55:26 %S A269735 0,1,-1,2,-3,2,0,2,-5,2,0,2,-2,2,0,2,-7,2,0,2,-2,2,0,2,-4,2,0,2,-2,2, %T A269735 0,2,-9,2,0,2,-2,2,0,2,-4,2,0,2,-2,2,0,2,-6,2,0,2,-2,2,0,2,-4,2,0,2, %U A269735 -2,2,0,2,-11,2,0,2,-2,2,0,2,-4,2,0,2,-2,2,0,2,-6,2,0,2,-2,2,0,2,-4,2,0,2,-2 %N A269735 G.f.: Sum_{k >= 0} x^(2^k)*(1-x^(2^k))/(1+x^(2^k)). %C A269735 Second differences of A268289. %H A269735 Antti Karttunen, <a href="/A269735/b269735.txt">Table of n, a(n) for n = 0..65537</a> %p A269735 t7:=add(x^(2^k)*(1-x^(2^k))/(1+x^(2^k)),k=0..12); %p A269735 t8:=series(t7,x,256); %p A269735 # second Maple program: %p A269735 b:= proc(n) option remember; `if`(n<0, 0, %p A269735 add(2*i-1, i=Bits[Split](n))) %p A269735 end: %p A269735 a:= n-> b(n)-b(n-1): %p A269735 seq(a(n), n=0..92); # _Alois P. Heinz_, Jan 18 2022 %t A269735 Join[{0, 0}, Table[DigitCount[n, 2, 1] - DigitCount[n, 2, 0], {n, 1, 100}]] // Differences (* _Jean-François Alcover_, Jun 27 2022 *) %o A269735 (PARI) %o A269735 up_to = 1024; %o A269735 A268289list(up_to) = { my(v=vector(up_to), s = 1); v[1] = s; for(n=2, up_to, s += (2*hammingweight(n) - #binary(n)); v[n] = s); (v); }; %o A269735 v268289 = A268289list(up_to+1); %o A269735 A268289(n) = if(!n,n,v268289[n]); %o A269735 almost_firstdiffs_of_A268289(n) = if(!n,1,v268289[n+1]-v268289[n]); %o A269735 A269735(n) = if(n<=1,n,almost_firstdiffs_of_A268289(n-1)-almost_firstdiffs_of_A268289(n-2)); \\ _Antti Karttunen_, Sep 30 2018 %o A269735 (PARI) %o A269735 up_to_k = 16; %o A269735 up_to = 1+(2^up_to_k); %o A269735 x='x+O('x^(up_to+1)); %o A269735 v269735 = Vec(sum(k=0,up_to_k,x^(2^k)*(1-x^(2^k))/(1+x^(2^k)))); %o A269735 A269735(n) = if(!n,n,v269735[n]); \\ _Antti Karttunen_, Oct 01 2018 %Y A269735 Cf. A268289, A187038. %K A269735 sign %O A269735 0,4 %A A269735 _N. J. A. Sloane_, Mar 11 2016