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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A292077 a(n) = 0 if n=1; a(n) = 1-a(n-2) if n is odd; a(n) = 1-a(n/2) if n is even. 6
0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
REFERENCES
Dekking, Michel, Michel Mendes France, and Alf van der Poorten. "Folds." The Mathematical Intelligencer, 4.3 (1982): 130-138 & front cover, and 4:4 (1982): 173-181 (printed in two parts). See Section 1.5.
LINKS
Jean-Paul Allouche, Schrödinger Operators with Rudin-Shapiro Potentials are not Palindromic, Journal of Mathematical Physics, volume 38, number 4, 1997, pages 1843-1848.  And the author's copy. Section IV paperfolding sequence z_n = a(n) for case i_m = m mod 2.
Mark D. LaDue, Clusters of Integers with Equal Total Stopping Times in the 3x + 1 Problem, arXiv:1709.02979 [math.NT], 2017.
Kevin Ryde, Iterations of the Alternate Paperfolding Curve, see index "TurnRpred".
Eric Weisstein's World of Mathematics, Collatz Problem
FORMULA
From Robert Israel, Sep 12 2017: (Start)
a(n) = (1 + (-1)^((A000265(n)+1)/2+A007814(n)))/2.
G.f.: Sum_{k>=0} (z^(2*4^k)/(1-z^(8*4^k)) + z^(3*4^k)/(1-z^(4*4^k))). (End)
From Jianing Song, Nov 27 2021: (Start)
Write n = (2*k+1) * 2^e, then a(n) = (k+e) mod 2.
A003324(2*n) = 2*(a(n)+1).
A209615(n) = (-1)^a(n).
a(n) = 1 - A106665(n-1). (End)
a(n) = A085062(n-1) mod 2. - Alois P. Heinz, Jul 01 2023
MAPLE
f:= proc(n) local k, m;
k:= padic:-ordp(n, 2);
m:= n/2^k;
(1 + (-1)^((m+1)/2+k))/2
end proc:
map(f, [$1..200]); # Robert Israel, Sep 12 2017
MATHEMATICA
a[1] = 0; a[n_] := a[n] = 1 - If[OddQ[n], a[n-2], a[n/2]];
Array[a, 100] (* Jean-François Alcover, Dec 09 2017 *)
PROG
(PARI) a(n) = if (n==1, 0, if (n%2, 1 - a(n-2), 1 - a(n/2)));
(PARI) a(n) = my(e=valuation(n, 2), k=bittest(n, e+1)); (k+e)%2 \\ Jianing Song, Nov 27 2021
CROSSREFS
Cf. A000265, A007814, A003324, A209615, A014682, A106665 (complement).
Positions of 0's and 1's: A338692, A338691.
Cf. A085062.
Sequence in context: A254114 A105384 A288694 * A327256 A327177 A366255
KEYWORD
nonn,easy
AUTHOR
Michel Marcus, Sep 12 2017
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)