|
| |
|
|
A014709
|
|
The regular paper-folding (or dragon curve) sequence.
|
|
1
| |
|
|
1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,3
|
|
|
REFERENCES
| G. Melancon, Factorizing infinite words using Maple, MapleTech journal, vol. 4, no. 1, 1997, pp. 34-42, esp. p. 36.
|
|
|
LINKS
| Index entries for sequences obtained by enumerating foldings
|
|
|
FORMULA
| Set a=1, b=2, S(0)=a, S(n+1) = S(n)aF(S(n)), where F(x) reverses x and then interchanges a and b; sequence is limit S(infinity).
a(4n) = 1, a(4n+2) = 2, a(2n+1) = a(n).
|
|
|
PROG
| (PARI) a(n)=if(n%2==0, 1+bitand(1, n\2), a(n\2) );
for(n=0, 122, print1(a(n), ", "))
|
|
|
CROSSREFS
| See A014577 for more references and more terms.
Sequence in context: A091243 A037826 A079882 * A069258 A126207 A191322
Adjacent sequences: A014706 A014707 A014708 * A014710 A014711 A014712
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
| |
|
|