# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a228039 Showing 1-1 of 1 %I A228039 #31 Oct 27 2023 10:02:12 %S A228039 0,1,1,0,1,1,0,1,1,1,1,1,0,0,1,0,1,1,1,1,1,0,1,1,0,1,0,0,1,1,0,1,1,1, %T A228039 1,1,1,0,1,1,1,1,0,1,1,0,1,0,0,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,1,1,1, %U A228039 1,0,1,1,1,0,0,1,1,1,1,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,0,1,0,1,1,0,1,1,1,1,0 %N A228039 Thue-Morse sequence along the squares: A010060(n^2). %C A228039 (Adapted from Drmota, Mauduit, and Rivat) The Thue-Morse sequence T(n) is a 0-1-sequence that can be defined by T(n) = s2(n) mod 2, where s2(n) denotes the binary sum-of-digits function of n (that is, the number of powers of 2). By definition it is clear that 0 and 1 appear with the same asymptotic frequency 1/2. However, there is no consecutive block of the form 000 or 111, so that the Thue-Morse sequence is not normal. (A 0-1-sequence is normal if every finite 0-1-block appears with the asymptotic frequency 1/2^k, where k denotes the length of the block.) Mauduit and Rivat (2009) showed that the subsequence T(n^2) also has the property that both 0 and 1 appear with the same asymptotic frequency 1/2. This solved a long-standing conjecture by Gelfond (1967/1968). Drmota, Mauduit, and Rivat (2013) proved that the subsequence T(n^2) is actually normal. %H A228039 Antti Karttunen, Table of n, a(n) for n = 0..65537 %H A228039 M. Drmota, C. Mauduit, and J. Rivat, The Thue-Morse Sequence Along The Squares is Normal, Abstract, ÖMG-DMV Congress, 2013. %H A228039 A. O. Gelfond, Sur les nombres qui ont des propriétés additives et multiplicatives données, Acta Arith. 13 (1967/1968) 259-265. %H A228039 C. Mauduit and J. Rivat, La somme des chiffres des carrés, Acta Mathem. 203 (1) (2009) 107-148. %H A228039 Wikipedia, Normal number %H A228039 Lukas Spiegelhofer, Thue-Morse along the sequence of cubes, arXiv:2308.09498 [math.NT], 2023. %H A228039 Index entries for characteristic functions %F A228039 a(n) = A010060(n^2) = A010060(A000290(n)). %t A228039 a[n_] := If[ n == 0, 0, If[ Mod[n, 2] == 0, a[n/2], 1 - a[(n - 1)/2]]]; Table[ a[n^2], {n, 0, 104}] %t A228039 (* Second program: *) %t A228039 ThueMorse[Range[0, 104]^2] (* _Michael De Vlieger_, Dec 22 2017 *) %o A228039 (PARI) a(n)=hammingweight(n^2)%2 \\ _Charles R Greathouse IV_, May 08 2016 %o A228039 (Python) %o A228039 def A228039(n): return (n**2).bit_count()&1 # _Chai Wah Wu_, Aug 22 2023 %Y A228039 Cf. A000290, A010060, A293162. %K A228039 nonn,easy %O A228039 0 %A A228039 _Jonathan Sondow_, Sep 02 2013 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE