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

%I #45 Jul 01 2023 20:34:13

%S 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,

%T 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,

%U 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

%N 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.

%D 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.

%H Robert Israel, <a href="/A292077/b292077.txt">Table of n, a(n) for n = 1..10000</a>

%H Jean-Paul Allouche, <a href="https://doi.org/10.1063/1.531916">Schrödinger Operators with Rudin-Shapiro Potentials are not Palindromic</a>, Journal of Mathematical Physics, volume 38, number 4, 1997, pages 1843-1848. And <a href="https://webusers.imj-prg.fr/~jean-paul.allouche/allouche97c.ps">the author's copy</a>. Section IV paperfolding sequence z_n = a(n) for case i_m = m mod 2.

%H Mark D. LaDue, <a href="https://arxiv.org/abs/1709.02979">Clusters of Integers with Equal Total Stopping Times in the 3x + 1 Problem</a>, arXiv:1709.02979 [math.NT], 2017.

%H Kevin Ryde, <a href="http://user42.tuxfamily.org/alternate/index.html">Iterations of the Alternate Paperfolding Curve</a>, see index "TurnRpred".

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Collatz_conjecture">Collatz conjecture</a>

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%F From _Robert Israel_, Sep 12 2017: (Start)

%F a(n) = (1 + (-1)^((A000265(n)+1)/2+A007814(n)))/2.

%F G.f.: Sum_{k>=0} (z^(2*4^k)/(1-z^(8*4^k)) + z^(3*4^k)/(1-z^(4*4^k))). (End)

%F From _Jianing Song_, Nov 27 2021: (Start)

%F Write n = (2*k+1) * 2^e, then a(n) = (k+e) mod 2.

%F A003324(2*n) = 2*(a(n)+1).

%F A209615(n) = (-1)^a(n).

%F a(n) = 1 - A106665(n-1). (End)

%F a(n) = A085062(n-1) mod 2. - _Alois P. Heinz_, Jul 01 2023

%p f:= proc(n) local k,m;

%p k:= padic:-ordp(n,2);

%p m:= n/2^k;

%p (1 + (-1)^((m+1)/2+k))/2

%p end proc:

%p map(f, [$1..200]); # _Robert Israel_, Sep 12 2017

%t a[1] = 0; a[n_] := a[n] = 1 - If[OddQ[n], a[n-2], a[n/2]];

%t Array[a, 100] (* _Jean-François Alcover_, Dec 09 2017 *)

%o (PARI) a(n) = if (n==1, 0, if (n%2, 1 - a(n-2), 1 - a(n/2)));

%o (PARI) a(n) = my(e=valuation(n, 2), k=bittest(n, e+1)); (k+e)%2 \\ _Jianing Song_, Nov 27 2021

%Y Cf. A000265, A007814, A003324, A209615, A014682, A106665 (complement).

%Y Positions of 0's and 1's: A338692, A338691.

%Y Cf. A085062.

%K nonn,easy

%O 1

%A _Michel Marcus_, Sep 12 2017

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 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)