The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A056832 All a(n) = 1 or 2; a(1) = 1; get next 2^k terms by repeating first 2^k terms and changing last element so sum of first 2^(k+1) terms is odd. 14
 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Dekking (2016) calls this the Toeplitz sequence or period-doubling sequence. - N. J. A. Sloane, Nov 08 2016 Fixed point of the morphism 1->12 and 2->11 (1 ->12 ->1211 ->12111212 ->..). - Benoit Cloitre, May 31 2004 a(n) is multiplicative. - Christian G. Bower, Jun 03 2005 a(n) is the least k such that A010060(n-1+k)=1-A010060(n-1); the sequence {a(n+1)-1} is the characteristic sequence for A079523. - Vladimir Shevelev, Jun 22 2009 The squarefree part of the even part of n. - Peter Munn, Dec 03 2020 REFERENCES Manfred R. Schroeder, Fractals, Chaos, Power Laws, W. H. Freeman, NY, 1991; pp. 277-279. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 F. Michel Dekking, Morphisms, Symbolic Sequences, and Their Standard Forms, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1. A. Hof, O. Knill and B. Simon, Singular continuous spectrum for palindromic Schroedinger operators, Commun. Math. Phys. 174 (1995), 149-159. Kostas Karamanos, From Symbolic Dynamics to a Digital Approach: Chaos and Transcendence, in: Michel Planat (ed.), Noise, Oscillators and Algebraic Randomness, Lecture Notes in Physics, Vol. 550, Springer, Berlin, Heidelberg, 2000. (Short version. See p. 359) Kostas Karamanos, From symbolic dynamics to a digital approach, International Journal of Bifurcation and Chaos, Vol. 11, No. 6 (2001), pp. 1683-1694. (Full version. See p. 1685) Manfred R. Schroeder, Letter to N. J. A. Sloane, May 05 1994. Eric Weisstein's World of Mathematics, Even Part. Eric Weisstein's World of Mathematics, Squarefree Part. FORMULA a(n) = ((-1)^(n+1)*A002425(n)) modulo 3. - Benoit Cloitre, Dec 30 2003 a(1)=1, a(n) = 1 + {sum(i=1, n-1, a(i)*a(n-i)) mod 2}. - Benoit Cloitre, Mar 16 2004 a(n) is multiplicative with a(2^e)=1+(1-(-1)^e)/2, a(p^e)=1 if p>2. - Michael Somos, Jun 18 2005 [a(2^n+1) .. a(2^(n+1)-1)] = [a(1) .. a(2^n-1)]; a(2^(n+1))=3-a(2^n). For n>0, a(n) = 2-A035263(n). - Benoit Cloitre, Nov 24 2002 a(n)=2 if n-1 is in A079523; a(n)=1 otherwise. - Vladimir Shevelev, Jun 22 2009 a(n) = A096268(n-1) + 1. - Reinhard Zumkeller, Jul 29 2014 From Peter Munn, Dec 03 2020: (Start) a(n) = A007913(A006519(n)) = A006519(n)/A234957(n). a(n) = A059895(n, 2) = n/A214682(n). a(n*k) = (a(n) * a(k)) mod 3. a(A059897(n, k)) = A059897(a(n), a(k)). (End) Asymptotic mean: lim_{m->oo} (1/m) * Sum__{k=1..m} a(k) = 4/3. - Amiram Eldar, Mar 09 2021 EXAMPLE 1 -> 1,2 -> 1,2,1,1 -> 1,2,1,1,1,2,1,2 -> 1,2,1,1,1,2,1,2,1,2,1,1,1,2,1,1. Here we have 1 element, then 2 elements, then 4, 8, 16, etc. MATHEMATICA Nest[ Function[l, {Flatten[(l /. {1 -> {1, 2}, 2 -> {1, 1}})]}], {1}, 7] (* Robert G. Wilson v, Mar 03 2005 *) Table[Mod[-(-1)^(n + 1) (-1)^n Numerator[EulerE[2 n + 1, 1]], 3] , {n, 0, 120}] (* Michael De Vlieger, Aug 15 2016, after Jean-François Alcover at A002425 *) PROG (PARI) a(n)=numerator(2/n*(4^n-1)*bernfrac(2*n))%3 (PARI) a(n)=if(n<1, 0, valuation(n, 2)%2+1) /* Michael Somos, Jun 18 2005 */ (Haskell) a056832 n = a056832_list !! (n-1) a056832_list = 1 : f  where    f xs = y : f (y : xs) where           y = 1 + sum (zipWith (*) xs \$ reverse xs) `mod` 2 -- Reinhard Zumkeller, Jul 29 2014 CROSSREFS Cf. A197911 (partial sums). Essentially same as first differences of Thue-Morse, A010060. - N. J. A. Sloane, Jul 02 2015 See A035263 for an equivalent version. Limit of A317956(n) for large n. Row/column 2 of A059895. Positions of 1s: A003159. Positions of 2s: A036554. A002425, A006519, A079523, A096268, A214682, A234957 are used in a formula defining this sequence. A059897 is used to express relationship between terms of this sequence. Sequence in context: A079806 A342845 A045887 * A105931 A279495 A300409 Adjacent sequences:  A056829 A056830 A056831 * A056833 A056834 A056835 KEYWORD easy,nonn,nice,mult AUTHOR Jonas Wallgren, Aug 30 2000 STATUS approved

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

Last modified June 21 03:17 EDT 2021. Contains 345354 sequences. (Running on oeis4.)