login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A228039
Thue-Morse sequence along the squares: A010060(n^2).
4
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, 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, 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
OFFSET
0
COMMENTS
(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.
LINKS
M. Drmota, C. Mauduit, and J. Rivat, The Thue-Morse Sequence Along The Squares is Normal, Abstract, ÖMG-DMV Congress, 2013.
A. O. Gelfond, Sur les nombres qui ont des propriétés additives et multiplicatives données, Acta Arith. 13 (1967/1968) 259-265.
C. Mauduit and J. Rivat, La somme des chiffres des carrés, Acta Mathem. 203 (1) (2009) 107-148.
Wikipedia, Normal number
Lukas Spiegelhofer, Thue-Morse along the sequence of cubes, arXiv:2308.09498 [math.NT], 2023.
FORMULA
a(n) = A010060(n^2) = A010060(A000290(n)).
MATHEMATICA
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}]
(* Second program: *)
ThueMorse[Range[0, 104]^2] (* Michael De Vlieger, Dec 22 2017 *)
PROG
(PARI) a(n)=hammingweight(n^2)%2 \\ Charles R Greathouse IV, May 08 2016
(Python)
def A228039(n): return (n**2).bit_count()&1 # Chai Wah Wu, Aug 22 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Sondow, Sep 02 2013
STATUS
approved