login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270803 Formal inverse of Thue-Morse sequence A010060. 2

%I

%S 0,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,

%T 1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

%N Formal inverse of Thue-Morse sequence A010060.

%H R. J. Mathar, <a href="/A270803/b270803.txt">Table of n, a(n) for n = 0..17000</a>

%H Maciej Gawron, and Maciej Ulas, <a href="http://dx.doi.org/10.1016/j.disc.2015.12.016">On formal inverse of the Prouhet-Thue-Morse sequence</a>, Discrete Mathematics 339.5 (2016): 1459-1470. Also <a href="http://arxiv.org/abs/1601.04840">arXiv</a>:1601.04840 [math.CO], 2016.

%F a(0)=0, a(1)=a(2)=1, a(3)=0; thereafter

%F if n mod 4 = 0 then a(n) = a(n-1),

%F if n mod 4 = 1 then a(n) = a(n-2),

%F if n mod 4 = 2 then a(n) = a(n-3),

%F otherwise a(n) = (a(n-4)+a((n-3)/4)) mod 2.

%F a(n) = A001002(n)(mod 2), for n > 0. - _John M. Campbell_, Jul 17 2016

%p A270803 := proc(n)

%p option remember;

%p if n <=3 then

%p op(n+1,[0,1,1,0]) ;

%p else

%p if n mod 4 = 0 then

%p procname(n-1)

%p elif n mod 4 = 1 then

%p procname(n-2)

%p elif n mod 4 = 2 then

%p procname(n-3)

%p else

%p (procname(n-4)+procname((n-3)/4)) mod 2;

%p end if;

%p end if;

%p end proc:

%p seq(A270803(n),n=0..120) ;

%t a[n_] := a[n] = Which[n <= 3, {0, 1, 1, 0}[[n + 1]], Mod[n, 4] == 0, a[n - 1], Mod[n, 4] == 1, a[n - 2], Mod[n, 4] == 2, a[n - 3], True, Mod[a[n - 4] + a[(n - 3)/4], 2]];

%t Table[a[n], {n, 0, 120}] (* _Jean-Fran├žois Alcover_, Nov 27 2017, from Maple *)

%Y Cf. A010060.

%Y See A270804 for positions of 1's

%K nonn

%O 0

%A _N. J. A. Sloane_, Apr 02 2016

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 January 20 07:59 EST 2020. Contains 331081 sequences. (Running on oeis4.)