login
This site is supported by donations to The OEIS Foundation.
Logo

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. 6
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; internal format)
OFFSET

1,2

COMMENTS

Fixed point of the morphism 1->12 and 2->11 (1 ->12 ->1211 ->12111212 ->..) - Benoit Cloitre (benoit7848c(AT)orange.fr), May 31 2004

a(n) is multiplicative - Christian G. Bower (bowerc(AT)usa.net), 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. [From Vladimir Shevelev (shevelev(AT)bgu.ac.il), Jun 22 2009]

REFERENCES

A. Hof, O. Knill and B. Simon, Singular continuous spectrum for palindromic Schroedinger operators, Commun. Math. Phys. 174 (1995), 149-159.

FORMULA

a(n)=((-1)^(n+1)*A002425(n)) modulo 3 - Benoit Cloitre (benoit7848c(AT)orange.fr), Dec 30 2003

a(1)=1, a(n)=1+{sum(i=1, n-1, a(i)*a(n-i)) mod 2} - Benoit Cloitre (benoit7848c(AT)orange.fr), 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. [From Vladimir Shevelev (shevelev(AT)bgu.ac.il), Jun 22 2009]

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

1 el 2 elts 4 elements .. 8 elements ....... 16 elements

MATHEMATICA

Nest[ Function[l, {Flatten[(l /. {1 -> {1, 2}, 2 -> {1, 1}})]}], {1}, 7] (from Robert G. Wilson v Mar 03 2005)

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 */

CROSSREFS

Sequence in context: A133162 A079806 A045887 * A105931 A173751 A126864

Adjacent sequences:  A056829 A056830 A056831 * A056833 A056834 A056835

KEYWORD

easy,nonn,nice,mult

AUTHOR

Jonas Wallgren (jonwa(AT)ida.liu.se), Aug 30 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 15:20 EST 2012. Contains 205823 sequences.