login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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. 2
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

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

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.

Eric Weisstein's World of Mathematics, Collatz Problem

Wikipedia, Collatz conjecture

Index entries for sequences related to 3x+1 (or 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)

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)));

CROSSREFS

Cf. A000265, A007814, A014682, A106665 (complement).

Sequence in context: A254114 A105384 A288694 * A327256 A327177 A057212

Adjacent sequences:  A292074 A292075 A292076 * A292078 A292079 A292080

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 03:21 EDT 2020. Contains 337289 sequences. (Running on oeis4.)