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 A115637 #29 Jul 18 2024 04:50:09 %S A115637 1,0,5,4,1,0,21,20,17,16,5,4,1,0,85,84,81,80,69,68,65,64,21,20,17,16, %T A115637 5,4,1,0,341,340,337,336,325,324,321,320,277,276,273,272,261,260,257, %U A115637 256,85,84,81,80,69,68,65,64,21,20,17,16,5,4,1,0,1365,1364,1361,1360,1349 %N A115637 In the binary expansion of n+2, transform 0->1 and 1->0 then interpret as base 4. %C A115637 Row sums of number triangle A115636. Partial sums of A115638. %C A115637 Old name was "A divide and conquer sequence". %H A115637 Alois P. Heinz, <a href="/A115637/b115637.txt">Table of n, a(n) for n = 0..16384</a> (first 1025 terms from Antti Karttunen) %H A115637 Ralf Stephan, <a href="https://arxiv.org/abs/math/0307027">Divide-and-conquer generating functions. I. Elementary sequences</a>, arXiv:math/0307027 [math.CO], 2003, see equation 2.4 with a(n) = a_{n+2} for case alpha=4, c=1, d=0. %F A115637 G.f.: (1/(1-x))*Sum_{k>=0} 4^k*x^(2^(k+1)-2)/(1+x^(2^k)); the g.f. G(x) satisfies G(x) - 4(1+x)*x^2*G(x^2) = 1/(1-x^2). %F A115637 a(n) = A000695(A035327(n+2)). - _Kevin Ryde_, Jul 15 2024 %p A115637 b:= n-> 1-(n mod 2)+`if`(n<2, 0, b(iquo(n, 2))*4): %p A115637 a:= n-> b(n+2): %p A115637 seq(a(n), n=0..66); # _Alois P. Heinz_, Jul 16 2024 %t A115637 A115637[n_] := FromDigits[1 - IntegerDigits[n + 2, 2], 4]; %t A115637 Array[A115637, 100, 0] (* _Paolo Xausa_, Jul 16 2024 *) %o A115637 (PARI) %o A115637 up_to = 1024; %o A115637 A115633array(n, k) = (((-1)^n)*if(n==k,1, if((k+k+2)==n, -4, if((k+1)==n, -(1+(-1)^k)/2, 0)))); %o A115637 A115637list(up_to) = { my(mA115633=matrix(up_to,up_to,n,k,A115633array(n-1,k-1)), mA115636 = matsolve(mA115633,matid(up_to)), v = vector(up_to)); for(n=1,up_to,v[n] = vecsum(mA115636[n,])); (v); }; %o A115637 v115637 = A115637list(up_to+1); %o A115637 A115637(n) = v115637[1+n]; \\ _Antti Karttunen_, Nov 02 2018 %o A115637 (PARI) a(n) = fromdigits([!b |b<-binary(n+2)], 4); \\ _Kevin Ryde_, Jul 15 2024 %o A115637 (Python) %o A115637 def A115637(n): return int(bin((~(n+2))^(-1<<(n+2).bit_length()))[2:],4) # _Chai Wah Wu_, Jul 17 2024 %Y A115637 Cf. A000695, A035327, A115633, A115636, A115638 (first differences), A374625. %K A115637 easy,nonn,look %O A115637 0,3 %A A115637 _Paul Barry_, Jan 27 2006 %E A115637 New name from _Kevin Ryde_, Jul 15 2024