|
|
A014707
|
|
a(4n)=0, a(4n+2)=1, a(2n+1)=a(n).
|
|
18
|
|
|
0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
The regular paper-folding (or dragon curve) sequence.
It appears that the sequence of run lengths is A088431. - Dimitri Hendriks, May 06 2010
Runs of three consecutive ones appear around positions n = 22, 46, 54, 86, 94, 118, 150, 174, 182,..., or for n of the form 2^(k+3)*(4*t+3)-2, k>=0, t>=0. - Vladimir Shevelev, Mar 19 2011
a(A091072(n)+1) = 0; a(A091067(n)+1) = 1. - Reinhard Zumkeller, Sep 28 2011
|
|
REFERENCES
|
G. Melancon, Factorizing infinite words using Maple, MapleTech journal, vol. 4, no. 1, 1997, pp. 34-42, esp. p. 36.
|
|
LINKS
|
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
J.-P. Allouche, M. Mendes France, A. Lubiw, A.J. van der Poorten and J. Shallit, Convergents of folded continued fractions
G. J. Endrullis, D. Hendriks and J. W. Klop, Degrees of streams
J.-Y. Kao et al., Words avoiding repetitions in arithmetic progressions
G. Melancon, Home page
G. Melancon, Lyndon factorization of infinite words, STACS 96 (Grenoble, 1996), 147-154, Lecture Notes in Comput. Sci., 1046, Springer, Berlin, 1996. Math. Rev. 98h:68188.
Index entries for sequences obtained by enumerating foldings
|
|
FORMULA
|
a(4n)=0, a(4n+2)=1, a(2n+1)=a(n).
a(n) = (1-jacobi(-1,n))/2 (cf. A034947). - N. J. A. Sloane, Jul 27 2012
Set a=0, b=1, 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((2*n+1)*2^p-1) = n mod 2, p >= 0. - Johannes W. Meijer, Jan 28 2013
|
|
MAPLE
|
nmax:=92: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 0 to ceil(nmax/(p+2))+1 do a((2*n+1)*2^p-1) := n mod 2 od: od: seq(a(n), n=0..nmax); # Johannes W. Meijer, Jan 28 2013
|
|
MATHEMATICA
|
a[n_ /; Mod[n, 4] == 0] = 0; a[n_ /; Mod[n, 4] == 2] = 1; a[n_ /; Mod[n, 2] == 1] := a[n] = a[(n - 1)/2]; Table[a[n], {n, 0, 92}] (* Jean-François Alcover, May 17 2011 *)
|
|
PROG
|
(Haskell)
a014707 n = a014707_list !! n
a014707_list = f 0 $ cycle [0, 0, 1, 0] where
f i (x:_:xs) = x : a014707 i : f (i+1) xs
-- Reinhard Zumkeller, Sep 28 2011
|
|
CROSSREFS
|
Equals 1 - A014577, which see for further references. Also a(n) = A038189(n+1).
The following are all essentially the same sequence: A014577, A014707, A014709, A014710, A034947, A038189, A082410.
Cf. A220466
Sequence in context: A189632 A131378 A189624 * A288213 A308187 A289007
Adjacent sequences: A014704 A014705 A014706 * A014708 A014709 A014710
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
N. J. A. Sloane
|
|
EXTENSIONS
|
More terms from Scott C. Lindhurst (ScottL(AT)alumni.princeton.edu)
|
|
STATUS
|
approved
|
|
|
|