The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A112865 a(n) = (-1)^(n + floor(n/4) + floor(n/4^2) + ...). 3
 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, 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, -1, 1, -1, 1, -1, 1, 1, -1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS 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. 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 LINKS Robert Israel, Table of n, a(n) for n = 0..10000 FORMULA a(n) = (-1)^n * a([n/4]). - Michael Somos, Aug 15 2008 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. G.f.: (Product_{k>0} 1 - x^(4^k)) / (Product_{k>=0} 1 + x^(4^k)). - Michael Somos, Aug 15 2008 a(n) = 2*A112539(n-1)-1. - Robert Israel, Apr 20 2017 a(n) = 1 - 2*A341389(n). - Kevin Ryde, Feb 17 2021 MAPLE f:= proc(n) option remember; (-1)^n*procname(floor(n/4)) end proc: f(0):= 1: seq(f(n), n=0..200); # Robert Israel, Apr 20 2017 PROG (PARI) {a(n) = if( n<1, n==0, (-1)^n * a(n \ 4))} /* Michael Somos, Aug 15 2008 */ (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 */ CROSSREFS Cf. A112539, A341389. Sequence in context: A164660 A212159 A106400 * A114523 A130151 A143431 Adjacent sequences: A112862 A112863 A112864 * A112866 A112867 A112868 KEYWORD easy,sign AUTHOR Arul Lakshminarayan (arul(AT)physics.iitm.ac.in), Sep 27 2005 EXTENSIONS Edited by Michael Somos, Aug 15 2008 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 21 02:47 EDT 2023. Contains 365486 sequences. (Running on oeis4.)