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 A112865 #19 Feb 20 2021 00:34:58 %S A112865 1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1, %T A112865 1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1, %U A112865 -1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1 %N A112865 a(n) = (-1)^(n + floor(n/4) + floor(n/4^2) + ...). %C A112865 The n-th term t(n)=(-1)^S(n). S(n)=Sum[ b(k)*a(k), k=0,L-1] where n=Sum[a(k)*2^k, k=0,L-1] (binary expansion of n) and b(k)=1 only if mod(k,2)=0, b(k)=0 otherwise. Closely related to the Thue-Morse sequence where all b(k) are 1. Also appears as the column at the "one-third" position of the Walsh-Hadamard matrix. %C A112865 This sequence, A112539, and A341389 are essentially the same, differing only in two values: 1,-1 here, 1,0 in A112539, 0,1 in A341389. - _Kevin Ryde_, Feb 17 2021 %H A112865 Robert Israel, <a href="/A112865/b112865.txt">Table of n, a(n) for n = 0..10000</a> %F A112865 a(n) = (-1)^n * a([n/4]). - _Michael Somos_, Aug 15 2008 %F A112865 Euler transform of sequence b(n) where b(1) = 1, b(2^(2*k-1)) = -1, b(2^(2*k)) = 2 unless k=0, b(n) = 0 otherwise. %F A112865 G.f.: (Product_{k>0} 1 - x^(4^k)) / (Product_{k>=0} 1 + x^(4^k)). - _Michael Somos_, Aug 15 2008 %F A112865 a(n) = 2*A112539(n-1)-1. - _Robert Israel_, Apr 20 2017 %F A112865 a(n) = 1 - 2*A341389(n). - _Kevin Ryde_, Feb 17 2021 %p A112865 f:= proc(n) option remember; (-1)^n*procname(floor(n/4)) end proc: %p A112865 f(0):= 1: %p A112865 seq(f(n),n=0..200); # _Robert Israel_, Apr 20 2017 %o A112865 (PARI) {a(n) = if( n<1, n==0, (-1)^n * a(n \ 4))} /* _Michael Somos_, Aug 15 2008 */ %o A112865 (PARI) {a(n) = local(A); if( n<0, 0, A = Vecrev(binary(n)); (-1)^sum(k=1, #A, A[k] * (k%2)))} /* _Michael Somos_, Aug 15 2008 */ %Y A112865 Cf. A112539, A341389. %K A112865 easy,sign %O A112865 0,1 %A A112865 Arul Lakshminarayan (arul(AT)physics.iitm.ac.in), Sep 27 2005 %E A112865 Edited by _Michael Somos_, Aug 15 2008