[go: up one dir, main page]

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!)
Search: a035263 -id:a035263
Displaying 1-10 of 82 results found. page 1 2 3 4 5 6 7 8 9
     Sort: relevance | references | number | modified | created      Format: long | short | data
A039963 The period-doubling sequence A035263 repeated. +20
15
1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
An example of a d-perfect sequence.
Motzkin numbers mod 2. - Benoit Cloitre, Mar 23 2004
Let {a, b, c, c, a, b, a, b, a, b, c, c, a, b, ...} be the fixed point of the morphism: a -> ab, b -> cc, c -> ab, starting from a; then the sequence is obtained by taking a = 1, b = 1, c = 0. - Philippe Deléham, Mar 28 2004
The asymptotic mean of this sequence is 2/3 (Rowland and Yassawi, 2015; Burns, 2016). - Amiram Eldar, Jan 30 2021
LINKS
Rob Burns, Asymptotic density of Motzkin numbers modulo small primes, arXiv:1611.04910 [math.NT], 2016.
David Kohel, San Ling and Chaoping Xing, Explicit Sequence Expansions, in: C. Ding, T. Helleseth and H. Niederreiter (eds.), Sequences and their Applications, Proceedings of SETA'98 (Singapore, 1998), Discrete Mathematics and Theoretical Computer Science, 1999, pp. 308-317; alternative link.
Eric Rowland and Reem Yassawi, Automatic congruences for diagonals of rational functions, Journal de Théorie des Nombres de Bordeaux, Vol. 27, No. 1 (2015), pp. 245-288; arXiv preprint, arXiv:1310.8635 [math.NT], 2013-2014.
T. Amdeberhan and M. Alekseyev, A moment sequence and Motzkin numbers. Modular coincidence?, MathOverflow, 2021.
FORMULA
a(n) = A035263(1+floor(n/2)). - Benoit Cloitre, Mar 23 2004
a(n) = A040039(n) mod 2 = A002212(n+1) mod 2. a(0) = a(1) = 1, for n>=2: a(n) = ( a(n) + Sum_{k=0..n-2} a(k)*a(n-2-k)) mod 2. - Philippe Deléham, Mar 26 2004
a(n) = (A(n+2) - A(n)) mod 2, for A = A019300, A001285, A010060, A010059, A000069, A001969. - Philippe Deléham, Mar 28 2004
a(n) = A001006(n) mod 2. - Christian G. Bower, Jun 12 2005
a(n) = (-1)^n*(A096268(n+1) - A096268(n)). - Johannes W. Meijer, Feb 02 2013
a(n) = 1 - A007814(floor(n/2)+1) mod 2 = A005802(n) mod 2. - Max Alekseyev, Oct 23 2021
MATHEMATICA
Flatten[ Nest[ Function[l, {Flatten[(l /. {a -> {a, b}, b -> {c, c}, c -> {a, b}})]}], {a}, 7] /. {a -> {1}, b -> {1}, c -> {0}}] (* Robert G. Wilson v, Feb 26 2005 *)
PROG
(PARI) A039963(n) = 1 - valuation(n\2+1, 2)%2; \\ Max Alekseyev, Oct 23 2021
(Python)
def A039963(n): return ((m:=(n>>1)+1)&-m).bit_length()&1 # Chai Wah Wu, Jan 09 2023
CROSSREFS
Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Christian G. Bower, Jun 12 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe and Ralf Stephan, Jul 13 2007
STATUS
approved
A359592 Parity (and also absolute values) of Dirichlet inverse of A035263, where A035263(n) is parity of 2-adic valuation of 2n. +20
5
1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
LINKS
FORMULA
Multiplicative with a(2^e) = 1 if e = 2, 0 otherwise, and for odd primes p, a(p^e) = 1 if e = 1, 0 otherwise.
a(n) = abs(A359591(n)) = A359591(n) mod 2.
a(n) = A092673(n) mod 2 = A359588(n) mod 2.
From Amiram Eldar, Jan 11 2023: (Start)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/Pi^2 = 0.506605... .
Dirichlet g.f.: (zeta(s)/zeta(2*s))*(4^s+1)/(4^s+2^s). (End)
MATHEMATICA
f[p_, e_] := If[e == 1, 1, 0]; f[2, e_] := If[e == 2, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 11 2023 *)
PROG
(PARI) A359592(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], (2==f[k, 2]), (1==f[k, 2]))); };
(Python)
from sympy import mobius
def A359592(n): return (mobius(n)&1)^(0 if n&1 else mobius(n>>1)&1) # Chai Wah Wu, Jan 09 2023
CROSSREFS
Characteristic function of A091428.
Also parity of A092673 and of A359588.
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jan 09 2023
STATUS
approved
A329320 a(n) = Sum_{k=0..floor(log_2(n))} 1 - A035263(1 + floor(n/2^k)). +20
3
0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
Sequence which arise from attempts to simplify computing of A329319.
For all positive integers k, the subsequence a(2^k) to a(3*2^(k-1)-1) is identical to the subsequence a(3*2^(k-1)) to a(2^(k+1)-1). Also subsequences a(2^k) to a(3*2^(k-1)-1) and a(0) to a(2^(k-1)-1) always differ by 1.
LINKS
Mikhail Kurkov, Table of n, a(n) for n = 0..8191 [verification needed]
FORMULA
a(n) = a(floor(n/2)) + 1 - A035263(n+1) for n>0 with a(0)=0.
a(2^m+k) = a(k mod 2^(m-1)) + 1 for 0<=k<2^m, m>0 with a(0)=0, a(1)=1.
PROG
(PARI) a(n) = if (n==0, 0, a(floor(n/2)) + valuation(n+1, 2) % 2); \\ Michel Marcus, Nov 13 2019
(PARI) a(n)=my(s, t); while(n, n>>=valuation(n, 2); t=valuation(n+1, 2); s+=(t+1)\2; n>>=t); s \\ Charles R Greathouse IV, Oct 14 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mikhail Kurkov, Nov 10 2019 [verification needed]
STATUS
approved
A265025 Determinants of the Hankel matrices for the period-doubling sequence A035263. +20
2
1, 1, -1, -3, 1, 1, -1, -15, 1, 1, -1, -3, 1, 1, -9, -495, 9, 1, -1, -3, 1, 1, -1, -15, 1, 1, -1, -3, 9, 81, -2025, -467775, 2025, 81, -9, -3, 1, 1, -1, -15, 1, 1, -1, -3, 1, 1, -9, -495, 9, 1, -1, -3, 1, 1, -1, -15, 9, 81, -729, -19683, 164025, 4100625, -496175625, -448046589375, 496175625, 4100625, -164025, -19683, 729, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
The n-th Hankel matrix of the sequence is formed by making an n X n matrix with each row a successive length-n "window" into the sequence.
LINKS
Robbert Fokkink, Cor Kraaikamp, and Jeffrey Shallit, Hankel matrices for the period-doubling sequence, arxiv preprint arXiv:1511.06569 [math.CO], 2015-2016.
FORMULA
a(2^k) = (-1)*A001045(k+1)*Product_{i=0..k-3} A001045(k-i)^(2^i) for k>=3.
MATHEMATICA
periodDouble[n_] :=Module[{A = {0, 1}}, For[i = 2, i <= n, i++, AppendTo[A, If[EvenQ[i], 1 - A[[ Floor[i/2] ]], 1]]]; A];
a[n_] := Module[{A, M}, A = periodDouble[2n-1]; M = Table[If[i == 0, 1, A[[i]]] , {j, 0, n-1}, {i, j, n+j-1}]; Det[M]];
Array[a, 70] (* Jean-François Alcover, Aug 12 2018, after Tom Edgar *)
PROG
(Sage)
def periodDouble(n):
A=[0, 1]
for i in [2..n]:
if i%2==0:
A.append(1-A[floor(i/2)])
else:
A.append(1)
return A[1:]
def a(n):
A=periodDouble(2*n-1)
M=matrix([[A[i] for i in [j..n+j-1]] for j in [0..n-1]])
return det(M)
[a(i) for i in [1..70]] # Tom Edgar, Nov 30 2015
CROSSREFS
KEYWORD
sign,look
AUTHOR
Jeffrey Shallit, Nov 30 2015
STATUS
approved
A359591 Dirichlet inverse of A035263, where A035263(n) is parity of 2-adic valuation of 2n. +20
2
1, 0, -1, -1, -1, 0, -1, 0, 0, 0, -1, 1, -1, 0, 1, 0, -1, 0, -1, 1, 1, 0, -1, 0, 0, 0, 0, 1, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 1, 0, 0, -1, 0, 0, 0, 1, 1, -1, 0, 1, 0, 1, 0, -1, -1, -1, 0, 0, 0, 1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 0, 1, 1, 0, -1, 0, 0, 0, -1, -1, 1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 1, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
LINKS
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A035263(n/d) * a(d).
Multiplicative with a(2^e) = -1 if e = 2, 0 otherwise, and for odd primes, a(p^e) = -1 if e = 1, 0 otherwise.
a(2n+1) = A008683(2n+1).
MATHEMATICA
f[p_, e_] := If[e == 1, -1, 0]; f[2, e_] := If[e == 2, -1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 26 2023 *)
PROG
(PARI) A359591(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], -(2==f[k, 2]), -(1==f[k, 2]))); };
(PARI)
A035263(n) = (valuation(2*n, 2)%2);
memoA359591 = Map();
A359591(n) = if(1==n, 1, my(v); if(mapisdefined(memoA359591, n, &v), v, v = -sumdiv(n, d, if(d<n, A035263(n/d)*A359591(d), 0)); mapput(memoA359591, n, v); (v)));
(Python)
from math import prod
from sympy import mobius, factorint
def A359591(n): return mobius(n) if n&1 else (0 if (m:=n>>1)&1 else prod(-int(e==1) for e in factorint(m).values())) # Chai Wah Wu, Jan 10 2023
CROSSREFS
Cf. A008683, A035263, A359592 (parity of terms, also their absolute values).
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Jan 09 2023
STATUS
approved
A174273 Inverse Moebius transform of A035263. +20
1
1, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 4, 2, 2, 4, 3, 2, 3, 2, 4, 4, 2, 2, 4, 3, 2, 4, 4, 2, 4, 2, 3, 4, 2, 4, 6, 2, 2, 4, 4, 2, 4, 2, 4, 6, 2, 2, 6, 3, 3, 4, 4, 2, 4, 4, 4, 4, 2, 2, 8, 2, 2, 6, 4, 4, 4, 2, 4, 4, 4, 2, 6, 2, 2, 6, 4, 4, 4, 2, 6, 5, 2, 2, 8, 4, 2, 4, 4, 2, 6, 4, 4, 4, 2, 4, 6, 2, 3, 6, 6, 2, 4, 2, 4, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(1) = 1, a(2n) = -a(n) + A000005(2n), a(2n+1) = sigma(2n+1) (A000203).
Dirichlet g.f.: 2^s*(zeta(s))^2/(2^s+1). - R. J. Mathar, Feb 06 2011
From Amiram Eldar, Nov 13 2022: (Start)
Multiplicative with s(2^e) = e+1-floor((e+1)/2) and a(p^e) = e+1 if p>2.
Sum_{k=1..n} a(k) ~ (2/3)*n*log(n) + (2/3)*(2*gamma - 1 + log(2)/2)*n, where gamma is Euler's constant (A001620). (End)
MATHEMATICA
f[p_, e_] := e + 1 - If[p == 2, Floor[(e + 1)/2], 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 13 2022 *)
PROG
(PARI) A174273(n) = sumdiv(n, d, (valuation(2*d, 2)%2)); \\ Antti Karttunen, Sep 27 2018
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 2]+1-if(f[i, 1] == 2, floor((f[i, 2]+1)/2), 0)); } \\ Amiram Eldar, Nov 13 2022
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Ralf Stephan, Nov 27 2010
EXTENSIONS
More terms from Antti Karttunen, Sep 27 2018
STATUS
approved
A180125 Self-convolution of period-doubling sequence A035263 +20
0
0, 1, 0, 2, 2, 3, 2, 5, 2, 5, 2, 6, 4, 7, 4, 10, 6, 9, 6, 12, 8, 11, 8, 15, 8, 13, 8, 16, 10, 15, 10, 21, 10, 17, 10, 20, 12, 19, 12, 25, 12, 21, 12, 24, 14, 23, 14, 30, 16, 25, 16, 30, 18, 27, 18, 35, 18, 29, 18, 34, 20, 31, 20, 42, 22, 33, 22, 40, 24, 35, 24, 45, 24, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Reducing a(n) mod 2 gives 1-A035263(n), which is also A096268(n+1).
LINKS
FORMULA
a(n) = sum(b(i)b(n-i), i=1..(n-1)), where b(i)=A035263(i).
MATHEMATICA
b[i_] := b[i] = If[OddQ[i], 1, 1 - b[i/2]]; a[n_] := Sum[b[i] b[n - i], {i, 1, n - 1}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Jacob A. Siehler, Aug 11 2010
STATUS
approved
A274186 Determinants of the Hankel matrices for the complement of the period-doubling sequence A035263. +20
0
0, -1, 0, 1, 0, -1, 0, 9, 0, -1, 0, 1, 0, -1, 0, 225, 0, -1, 0, 1, 0, -1, 0, 9, 0, -1, 0, 1, 0, -81, 0, 245025, 0, -81, 0, 1, 0, -1, 0, 9, 0, -1, 0, 1, 0, -1, 0, 225, 0, -1, 0, 1, 0, -1, 0, 9, 0, -81, 0, 6561, 0, -4100625, 0, 218813450625, 0, -4100625, 0, 6561, 0, -81, 0, 9, 0, -1, 0, 1, 0, -1, 0, 225, 0, -1, 0, 1, 0, -1, 0, 9, 0, -1, 0, 1, 0, -81 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
COMMENTS
The complement of the period-doubling sequence is generated by the map sending 0 -> 01, 1 -> 00.
LINKS
Robbert Fokkink, Cor Kraaikamp, and Jeffrey Shallit, Hankel matrices for the period-doubling sequence, arxiv preprint arXiv:1511.06569 [math.CO], November 2015.
CROSSREFS
KEYWORD
sign
AUTHOR
Jeffrey Shallit, Jun 21 2016
STATUS
approved
A000265 Remove all factors of 2 from n; or largest odd divisor of n; or odd part of n.
(Formerly M2222 N0881)
+10
684
1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31, 1, 33, 17, 35, 9, 37, 19, 39, 5, 41, 21, 43, 11, 45, 23, 47, 3, 49, 25, 51, 13, 53, 27, 55, 7, 57, 29, 59, 15, 61, 31, 63, 1, 65, 33, 67, 17, 69, 35, 71, 9, 73, 37, 75, 19, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
When n > 0 is written as k*2^j with k odd then k = A000265(n) and j = A007814(n), so: when n is written as k*2^j - 1 with k odd then k = A000265(n+1) and j = A007814(n+1), when n > 1 is written as k*2^j + 1 with k odd then k = A000265(n-1) and j = A007814(n-1).
Also denominator of 2^n/n (numerator is A075101(n)). - Reinhard Zumkeller, Sep 01 2002
Slope of line connecting (o, a(o)) where o = (2^k)(n-1) + 1 is 2^k and (by design) starts at (1, 1). - Josh Locker (joshlocker(AT)macfora.com), Apr 17 2004
Numerator of n/2^(n-1). - Alexander Adamchuk, Feb 11 2005
From Marco Matosic, Jun 29 2005: (Start)
"The sequence can be arranged in a table:
1
1 3 1
1 5 3 7 1
1 9 5 11 3 13 7 15 1
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31 1
Every new row is the previous row interspaced with the continuation of the odd numbers.
Except for the ones; the terms (t) in each column are t+t+/-s = t_+1. Starting from the center column of threes and working to the left the values of s are given by A000265 and working to the right by A000265." (End)
This is a fractal sequence. The odd-numbered elements give the odd natural numbers. If these elements are removed, the original sequence is recovered. - Kerry Mitchell, Dec 07 2005
2k + 1 is the k-th and largest of the subsequence of k terms separating two successive equal entries in a(n). - Lekraj Beedassy, Dec 30 2005
It's not difficult to show that the sum of the first 2^n terms is (4^n + 2)/3. - Nick Hobson, Jan 14 2005
In the table, for each row, (sum of terms between 3 and 1) - (sum of terms between 1 and 3) = A020988. - Eric Desbiaux, May 27 2009
This sequence appears in the analysis of A160469 and A156769, which resemble the numerator and denominator of the Taylor series for tan(x). - Johannes W. Meijer, May 24 2009
Indices n such that a(n) divides 2^n - 1 are listed in A068563. - Max Alekseyev, Aug 25 2013
From Alexander R. Povolotsky, Dec 17 2014: (Start)
With regard to the tabular presentation described in the comment by Marco Matosic: in his drawing, starting with the 3rd row, the first term in the row, which is equal to 1 (or, alternatively the last term in the row, which is also equal to 1), is not in the actual sequence and is added to the drawing as a fictitious term (for the sake of symmetry); an actual A000265(n) could be considered to be a(j,k) (where j >= 1 is the row number and k>=1 is the column subscript), such that a(j,1) = 1:
1
1 3
1 5 3 7
1 9 5 11 3 13 7 15
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31
and so on ... .
The relationship between k and j for each row is 1 <= k <= 2^(j-1). In this corrected tabular representation, Marco's notion that "every new row is the previous row interspaced with the continuation of the odd numbers" remains true. (End)
Partitions natural numbers to the same equivalence classes as A064989. That is, for all i, j: a(i) = a(j) <=> A064989(i) = A064989(j). There are dozens of other such sequences (like A003602) for which this also holds: In general, all sequences for which a(2n) = a(n) and the odd bisection is injective. - Antti Karttunen, Apr 15 2017
From Paul Curtz, Feb 19 2019: (Start)
This sequence is the truncated triangle:
1, 1;
3, 1, 5;
3, 7, 1, 9;
5, 11, 3, 13, 7;
15, 1, 17, 9, 19, 5;
21, 11, 23, 3, 25, 13, 27;
7, 29, 15, 31, 1, 33, 17, 35;
...
The first column is A069834. The second column is A213671. The main diagonal is A236999. The first upper diagonal is A125650 without 0.
c(n) = ((n*(n+1)/2))/A069834 = 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 2, 2, 1, 1, 8, 8, 1, 1, ... for n > 0. n*(n+1)/2 is the rank of A069834. (End)
As well as being multiplicative, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 27 2019
a(n) is also the map n -> A026741(n) applied at least A007814(n) times. - Federico Provvedi, Dec 14 2021
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Daniel Forgues, Table of n, a(n) for n = 1..100000 (first 10000 terms from T. D. Noe)
V. Daiev and J. L. Brown, Problem H-81, Fib. Quart., 6 (1968), 52.
Eric Weisstein's World of Mathematics, Odd Part
Eric Weisstein's World of Mathematics, Trigonometry Angles
Eric Weisstein's World of Mathematics, Sphere Line Picking
FORMULA
a(n) = if n is odd then n, otherwise a(n/2). - Reinhard Zumkeller, Sep 01 2002
a(n) = n/A006519(n) = 2*A025480(n-1) + 1.
Multiplicative with a(p^e) = 1 if p = 2, p^e if p > 2. - David W. Wilson, Aug 01 2001
a(n) = Sum_{d divides n and d is odd} phi(d). - Vladeta Jovovic, Dec 04 2002
G.f.: -x/(1 - x) + Sum_{k>=0} (2*x^(2^k)/(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))). - Ralf Stephan, Sep 05 2003
(a(k), a(2k), a(3k), ...) = a(k)*(a(1), a(2), a(3), ...) In general, a(n*m) = a(n)*a(m). - Josh Locker (jlocker(AT)mail.rochester.edu), Oct 04 2005
a(n) = Sum_{k=0..n} A127793(n,k)*floor((k+2)/2) (conjecture). - Paul Barry, Jan 29 2007
Dirichlet g.f.: zeta(s-1)*(2^s - 2)/(2^s - 1). - Ralf Stephan, Jun 18 2007
a(A132739(n)) = A132739(a(n)) = A132740(n). - Reinhard Zumkeller, Aug 27 2007
a(n) = 2*A003602(n) - 1. - Franklin T. Adams-Watters, Jul 02 2009
a(n) = n/gcd(2^n,n). (This also shows that the true offset is 0 and a(0) = 0.) - Peter Luschny, Nov 14 2009
a(-n) = -a(n) for all n in Z. - Michael Somos, Sep 19 2011
From Reinhard Zumkeller, May 01 2012: (Start)
A182469(n, k) = A027750(a(n), k), k = 1..A001227(n).
a(n) = A182469(n, A001227(n)). (End)
a((2*n-1)*2^p) = 2*n - 1, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 05 2013
G.f.: G(0)/(1 - 2*x^2 + x^4) - 1/(1 - x), where G(k) = 1 + 1/(1 - x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))/(x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2))) + (1 - 2*x^(2^(k+2)) + x^(2^(k+3)))/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 06 2013
a(n) = A003961(A064989(n)). - Antti Karttunen, Apr 15 2017
Completely multiplicative with a(2) = 1 and a(p) = p for prime p > 2, i.e., the sequence b(n) = a(n) * A008683(n) for n > 0 is the Dirichlet inverse of a(n). - Werner Schulte, Jul 08 2018
From Peter Bala, Feb 27 2019: (Start)
O.g.f.: F(x) - F(x^2) - F(x^4) - F(x^8) - ..., where F(x) = x/(1 - x)^2 is the generating function for the positive integers.
O.g.f. for reciprocals: Sum_{n >= 1} x^n/a(n) = L(x) + (1/2)*L(x^2) + (1/2)*L(x^4) + (1/2)*L(x^8) + ..., where L(x) = log(1/(1 - x)).
Sum_{n >= 1} x^n/a(n) = 1/2*log(G(x)), where G(x) = 1 + 2*x + 4*x^2 + 6*x^3 + 10*x^4 + ... is the o.g.f. of A000123. (End)
O.g.f.: Sum_{n >= 1} phi(2*n-1)*x^(2*n-1)/(1 - x^(2*n-1)), where phi(n) is the Euler totient function A000010. - Peter Bala, Mar 22 2019
a(n) = n - (1/2)*Sum_{d|2n} (-1)^d*phi(d). - Ridouane Oudra, May 01 2019
a(n) = A049606(n) / A049606(n-1). - Flávio V. Fernandes, Dec 08 2020
a(n) = numerator of n/2^(floor(n/2)). - Federico Provvedi, Dec 14 2021
a(n) = Sum_{d divides n} (-1)^(d+1)*phi(2*n/d). - Peter Bala, Jan 14 2024
EXAMPLE
G.f. = x + x^2 + 3*x^3 + x^4 + 5*x^5 + 3*x^6 + 7*x^7 + x^8 + 9*x^9 + 5*x^10 + 11*x^11 + ...
MAPLE
A000265:=proc(n) local t1, d; t1:=1; for d from 1 by 2 to n do if n mod d = 0 then t1:=d; fi; od; t1; end: seq(A000265(n), n=1..77);
A000265 := n -> n/2^padic[ordp](n, 2): seq(A000265(n), n=1..77); # Peter Luschny, Nov 26 2010
MATHEMATICA
a[n_Integer /; n > 0] := n/2^IntegerExponent[n, 2]; Array[a, 77] (* Josh Locker *)
a[ n_] := If[ n == 0, 0, n / 2^IntegerExponent[ n, 2]]; (* Michael Somos, Dec 17 2014 *)
PROG
(PARI)
{a(n) = n >> valuation(n, 2)}; /* Michael Somos, Aug 09 2006, edited by M. F. Hasler, Dec 18 2014 */
(Haskell)
a000265 = until odd (`div` 2)
-- Reinhard Zumkeller, Jan 08 2013, Apr 08 2011, Oct 14 2010
(Scheme) (define (A000265 n) (let loop ((n n)) (if (odd? n) n (loop (/ n 2))))) ;; Antti Karttunen, Apr 15 2017
(Python)
from __future__ import division
def A000265(n):
while not n % 2:
n //= 2
return n # Chai Wah Wu, Mar 25 2018
(Java)
int A000265(n){
while(n%2==0) n>>=1;
return n;
}
/* Aidan Simmons, Feb 24 2019 */
(Julia)
using IntegerSequences
[OddPart(n) for n in 1:77] |> println # Peter Luschny, Sep 25 2021
(Magma)
A000265:= func< n | n/2^Valuation(n, 2) >;
[A000265(n): n in [1..120]]; // G. C. Greubel, Jul 31 2024
(SageMath)
def A000265(n): return n//2^valuation(n, 2)
[A000265(n) for n in (1..121)] # G. C. Greubel, Jul 31 2024
CROSSREFS
Cf. A049606 (partial products), A135013 (partial sums), A099545 (mod 4), A326937 (Dirichlet inverse).
Cf. A026741 (map), A001511 (converging steps), A038550 (prime index).
Cf. A195056 (Dgf at s=3).
KEYWORD
mult,nonn,easy,nice
AUTHOR
EXTENSIONS
Additional comments from Henry Bottomley, Mar 02 2000
More terms from Larry Reeves (larryr(AT)acm.org), Mar 14 2000
Name clarified by David A. Corneth, Apr 15 2017
STATUS
approved
A010060 Thue-Morse sequence: let A_k denote the first 2^k terms; then A_0 = 0 and for k >= 0, A_{k+1} = A_k B_k, where B_k is obtained from A_k by interchanging 0's and 1's. +10
569
0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Named after Axel Thue, whose name is pronounced as if it were spelled "Tü" where the ü sound is roughly as in the German word üben. (It is incorrect to say "Too-ee" or "Too-eh".) - N. J. A. Sloane, Jun 12 2018
Also called the Thue-Morse infinite word, or the Morse-Hedlund sequence, or the parity sequence.
Fixed point of the morphism 0 --> 01, 1 --> 10, see example. - Joerg Arndt, Mar 12 2013
The sequence is cubefree (does not contain three consecutive identical blocks) [see Offner for a direct proof] and is overlap-free (does not contain XYXYX where X is 0 or 1 and Y is any string of 0's and 1's).
a(n) = "parity sequence" = parity of number of 1's in binary representation of n.
To construct the sequence: alternate blocks of 0's and 1's of successive lengths A003159(k) - A003159(k-1), k = 1, 2, 3, ... (A003159(0) = 0). Example: since the first seven differences of A003159 are 1, 2, 1, 1, 2, 2, 2, the sequence starts with 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0. - Emeric Deutsch, Jan 10 2003
Characteristic function of A000069 (odious numbers). - Ralf Stephan, Jun 20 2003
a(n) = S2(n) mod 2, where S2(n) = sum of digits of n, n in base-2 notation. There is a class of generalized Thue-Morse sequences: Let Sk(n) = sum of digits of n; n in base-k notation. Let F(t) be some arithmetic function. Then a(n)= F(Sk(n)) mod m is a generalized Thue-Morse sequence. The classical Thue-Morse sequence is the case k=2, m=2, F(t)= 1*t. - Ctibor O. Zizka, Feb 12 2008 (with correction from Daniel Hug, May 19 2017)
More generally, the partial sums of the generalized Thue-Morse sequences a(n) = F(Sk(n)) mod m are fractal, where Sk(n) is sum of digits of n, n in base k; F(t) is an arithmetic function; m integer. - Ctibor O. Zizka, Feb 25 2008
Starting with offset 1, = running sums mod 2 of the kneading sequence (A035263, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); also parity of A005187: (1, 3, 4, 7, 8, 10, 11, 15, 16, 18, 19, ...). - Gary W. Adamson, Jun 15 2008
Generalized Thue-Morse sequences mod n (n>1) = the array shown in A141803. As n -> infinity the sequences -> (1, 2, 3, ...). - Gary W. Adamson, Jul 10 2008
The Thue-Morse sequence for N = 3 = A053838, (sum of digits of n in base 3, mod 3): (0, 1, 2, 1, 2, 0, 2, 0, 1, 1, 2, ...) = A004128 mod 3. - Gary W. Adamson, Aug 24 2008
For all positive integers k, the subsequence a(0) to a(2^k-1) is identical to the subsequence a(2^k+2^(k-1)) to a(2^(k+1)+2^(k-1)-1). That is to say, the first half of A_k is identical to the second half of B_k, and the second half of A_k is identical to the first quarter of B_{k+1}, which consists of the k/2 terms immediately following B_k.
Proof: The subsequence a(2^k+2^(k-1)) to a(2^(k+1)-1), the second half of B_k, is by definition formed from the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k, by interchanging its 0's and 1's. In turn, the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k, which is by definition also B_{k-1}, is by definition formed from the subsequence a(0) to a(2^(k-1)-1), the first half of A_k, which is by definition also A_{k-1}, by interchanging its 0's and 1's. Interchanging the 0's and 1's of a subsequence twice leaves it unchanged, so the subsequence a(2^k+2^(k-1)) to a(2^(k+1)-1), the second half of B_k, must be identical to the subsequence a(0) to a(2^(k-1)-1), the first half of A_k.
Also, the subsequence a(2^(k+1)) to a(2^(k+1)+2^(k-1)-1), the first quarter of B_{k+1}, is by definition formed from the subsequence a(0) to a(2^(k-1)-1), the first quarter of A_{k+1}, by interchanging its 0's and 1's. As noted above, the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k, which is by definition also B_{k-1}, is by definition formed from the subsequence a(0) to a(2^(k-1)-1), which is by definition A_{k-1}, by interchanging its 0's and 1's, as well. If two subsequences are formed from the same subsequence by interchanging its 0's and 1's then they must be identical, so the subsequence a(2^(k+1)) to a(2^(k+1)+2^(k-1)-1), the first quarter of B_{k+1}, must be identical to the subsequence a(2^(k-1)) to a(2^k-1), the second half of A_k.
Therefore the subsequence a(0), ..., a(2^(k-1)-1), a(2^(k-1)), ..., a(2^k-1) is identical to the subsequence a(2^k+2^(k-1)), ..., a(2^(k+1)-1), a(2^(k+1)), ..., a(2^(k+1)+2^(k-1)-1), QED.
According to the German chess rules of 1929 a game of chess was drawn if the same sequence of moves was repeated three times consecutively. Euwe, see the references, proved that this rule could lead to infinite games. For his proof he reinvented the Thue-Morse sequence. - Johannes W. Meijer, Feb 04 2010
"Thue-Morse 0->01 & 1->10, at each stage append the previous with its complement. Start with 0, 1, 2, 3 and write them in binary. Next calculate the sum of the digits (mod 2) - that is divide the sum by 2 and use the remainder." Pickover, The Math Book.
Let s_2(n) be the sum of the base-2 digits of n and epsilon(n) = (-1)^s_2(n), the Thue-Morse sequence, then prod(n >= 0, ((2*n+1)/(2*n+2))^epsilon(n) ) = 1/sqrt(2). - Jonathan Vos Post, Jun 06 2012
Dekking shows that the constant obtained by interpreting this sequence as a binary expansion is transcendental; see also "The Ubiquitous Prouhet-Thue-Morse Sequence". - Charles R Greathouse IV, Jul 23 2013
Drmota, Mauduit, and Rivat proved that the subsequence a(n^2) is normal--see A228039. - Jonathan Sondow, Sep 03 2013
Although the probability of a 0 or 1 is equal, guesses predicated on the latest bit seen produce a correct match 2 out of 3 times. - Bill McEachen, Mar 13 2015
From a(0) to a(2n+1), there are n+1 terms equal to 0 and n+1 terms equal to 1 (see Hassan Tarfaoui link, Concours Général 1990). - Bernard Schott, Jan 21 2022
REFERENCES
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 15.
Jason Bell, Michael Coons, and Eric Rowland, "The Rational-Transcendental Dichotomy of Mahler Functions", Journal of Integer Sequences, Vol. 16 (2013), #13.2.10.
J. Berstel and J. Karhumaki, Combinatorics on words - a tutorial, Bull. EATCS, #79 (2003), pp. 178-228.
B. Bollobas, The Art of Mathematics: Coffee Time in Memphis, Cambridge, 2006, p. 224.
S. Brlek, Enumeration of factors in the Thue-Morse word, Discrete Applied Math., 24 (1989), 83-96. doi:10.1016/0166-218X(92)90274-E.
Yann Bugeaud and Guo-Niu Han, A combinatorial proof of the non-vanishing of Hankel determinants of the Thue-Morse sequence, Electronic Journal of Combinatorics 21(3) (2014), #P3.26.
Y. Bugeaud and M. Queffélec, On Rational Approximation of the Binary Thue-Morse-Mahler Number, Journal of Integer Sequences, 16 (2013), #13.2.3.
Currie, James D. "Non-repetitive words: Ages and essences." Combinatorica 16.1 (1996): 19-40
Colin Defant, Anti-Power Prefixes of the Thue-Morse Word, Journal of Combinatorics, 24(1) (2017), #P1.32
F. M. Dekking, Transcendance du nombre de Thue-Morse, Comptes Rendus de l'Academie des Sciences de Paris 285 (1977), pp. 157-160.
F. M. Dekking, On repetitions of blocks in binary sequences. J. Combinatorial Theory Ser. A 20 (1976), no. 3, pp. 292-299. MR0429728(55 #2739)
Dekking, Michel, Michel Mendès 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).
Dubickas, Artūras. On a sequence related to that of Thue-Morse and its applications. Discrete Math. 307 (2007), no. 9-10, 1082--1093. MR2292537 (2008b:11086).
Fabien Durand, Julien Leroy, and Gwenaël Richomme, "Do the Properties of an S-adic Representation Determine Factor Complexity?", Journal of Integer Sequences, Vol. 16 (2013), #13.2.6.
M. Euwe, Mengentheoretische Betrachtungen Über das Schachspiel, Proceedings Koninklijke Nederlandse Akademie van Wetenschappen, Amsterdam, Vol. 32 (5): 633-642, 1929.
S. Ferenczi, Complexity of sequences and dynamical systems, Discrete Math., 206 (1999), 145-154.
S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 6.8.
W. H. Gottschalk and G. A. Hedlund, Topological Dynamics. American Mathematical Society, Colloquium Publications, Vol. 36, Providence, RI, 1955, p. 105.
J. Grytczuk, Thue type problems for graphs, points and numbers, Discrete Math., 308 (2008), 4419-4429.
A. Hof, O. Knill and B. Simon, Singular continuous spectrum for palindromic Schroedinger operators, Commun. Math. Phys. 174 (1995), 149-159.
Mari Huova and Juhani Karhumäki, "On Unavoidability of k-abelian Squares in Pure Morphic Words", Journal of Integer Sequences, Vol. 16 (2013), #13.2.9.
B. Kitchens, Review of "Computational Ergodic Theory" by G. H. Choe, Bull. Amer. Math. Soc., 44 (2007), 147-155.
Le Breton, Xavier, Linear independence of automatic formal power series. Discrete Math. 306 (2006), no. 15, 1776-1780.
M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 23.
Donald MacMurray, A mathematician gives an hour to chess, Chess Review 6 (No. 10, 1938), 238. [Discusses Marston's 1938 article]
Mauduit, Christian. Multiplicative properties of the Thue-Morse sequence. Period. Math. Hungar. 43 (2001), no. 1-2, 137--153. MR1830572 (2002i:11081)
C. A. Pickover, Wonders of Numbers, Adventures in Mathematics, Mind and Meaning, Chapter 17, 'The Pipes of Papua,' Oxford University Press, Oxford, England, 2000, pages 34-38.
C. A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.
Clifford A. Pickover, The Math Book, From Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics, Sterling Publ., NY, 2009, page 316.
Narad Rampersad and Elise Vaslet, "On Highly Repetitive and Power Free Words", Journal of Integer Sequences, Vol. 16 (2013), #13.2.7.
G. Richomme, K. Saari, L. Q. Zamboni, Abelian complexity in minimal subshifts, J. London Math. Soc. 83(1) (2011) 79-95.
Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
M. Rigo, P. Salimov, and E. Vandomme, "Some Properties of Abelian Return Words", Journal of Integer Sequences, Vol. 16 (2013), #13.2.5.
Benoit Rittaud, Elise Janvresse, Emmanuel Lesigne and Jean-Christophe Novelli, Quand les maths se font discrètes, Le Pommier, 2008 (ISBN 978-2-7465-0370-0).
A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 6.
Shallit, J. O. "On Infinite Products Associated with Sums of Digits." J. Number Th. 21, 128-134, 1985.
Ian Stewart, "Feedback", Mathematical Recreations Column, Scientific American, 274 (No. 3, 1996), page 109 [Historical notes on this sequence]
Thomas Stoll, On digital blocks of polynomial values and extractions in the Rudin-Shapiro sequence, RAIRO - Theoretical Informatics and Applications (RAIRO: ITA), EDP Sciences, 2016, 50, pp. 93-99. <hal-01278708>.
A. Thue. Über unendliche Zeichenreihen, Norske Vid. Selsk. Skr. I. Mat. Nat. Kl. Christiania, No. 7 (1906), 1-22.
A. Thue, Über die gegenseitige Lage gleicher Teile gewisser Zeichenreihen, Norske Vid. Selsk. Skr. I. Mat. Nat. Kl. Christiania, 1 (1912), 1-67.
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 890.
LINKS
A. G. M. Ahmed, AA Weaving. In: Proceedings of Bridges 2013: Mathematics, Music, Art, ..., 2013.
A. Aksenov, The Newman phenomenon and Lucas sequence, arXiv preprint arXiv:1108.5352 [math.NT], 2011-2012.
Max A. Alekseyev and N. J. A. Sloane, On Kaprekar's Junction Numbers, arXiv:2112.14365, 2021; Journal of Combinatorics and Number Theory, 2022 (to appear).
J.-P. Allouche, Series and infinite products related to binary expansions of integers, Behaviour, 4.4 (1992): p. 5.
J.-P. Allouche, Lecture notes on automatic sequences, Krakow October 2013.
J.-P. Allouche, Thue, Combinatorics on words, and conjectures inspired by the Thue-Morse sequence, J. de Théorie des Nombres de Bordeaux, 27, no. 2 (2015), 375-388.
J.-P. Allouche, Andre Arnold, Jean Berstel, Srecko Brlek, William Jockusch, Simon Plouffe and Bruce E. Sagan, A relative of the Thue-Morse sequence, Discrete Math., 139 (1995), 455-461.
Jean-Paul Allouche, Julien Cassaigne, Jeffrey Shallit and Luca Q. Zamboni, A Taxonomy of Morphic Sequences, arXiv preprint arXiv:1711.10807 [cs.FL], Nov 29 2017.
J.-P. Allouche and H. Cohen, Dirichlet Series and Curious Infinite Products, Bull. London Math. Soc. 17, 531-538, 1985.
J.-P. Allouche and M. Mendes France, Automata and Automatic Sequences, in: Axel F. and Gratias D. (eds), Beyond Quasicrystals. Centre de Physique des Houches, vol 3. Springer, Berlin, Heidelberg, pp. 293-367, 1995; DOI https://doi.org/10.1007/978-3-662-03130-8_11.
J.-P. Allouche and M. Mendes France, Automata and Automatic Sequences, in: Axel F. and Gratias D. (eds), Beyond Quasicrystals. Centre de Physique des Houches, vol 3. Springer, Berlin, Heidelberg, pp. 293-367, 1995; DOI https://doi.org/10.1007/978-3-662-03130-8_11. [Local copy]
J.-P. Allouche and Jeffrey Shallit, The Ubiquitous Prouhet-Thue-Morse Sequence, in C. Ding. T. Helleseth and H. Niederreiter, eds., Sequences and Their Applications: Proceedings of SETA '98, Springer-Verlag, 1999, pp. 1-16.
J.-P. Allouche and J. Shallit, The Ring of k-regular Sequences, II, Theoretical Computer Science 307.1 (2003): 3-29. doi:10.1016/S0304-3975(03)00090-2
Jorge Almeida and Ondrej Klíma, Binary patterns in the Prouhet-Thue-Morse sequence, arXiv:1904.07137 [math.CO], 2019.
G. N. Arzhantseva, C. H. Cashen, D. Gruber and D. Hume, Contracting geodesics in infinitely presented graphical small cancellation groups, arXiv preprint arXiv:1602.03767 [math.GR], 2016-2018.
Ricardo Astudillo, On a Class of Thue-Morse Type Sequences, J. Integer Seqs., Vol. 6, 2003.
F. Axel et al., Vibrational modes in a one dimensional "quasi-alloy": the Morse case, J. de Physique, Colloq. C3, Supp. to No. 7, Vol. 47 (Jul 1986), pp. C3-181-C3-186; see Eq. (10).
M. Baake, U. Grimm and J. Nilsson, Scaling of the Thue-Morse diffraction measure, arXiv preprint arXiv:1311.4371 [math-ph], 2013.
Scott Balchin and Dan Rust, Computations for Symbolic Substitutions, Journal of Integer Sequences, Vol. 20 (2017), Article 17.4.1.
Lucilla Baldini and Josef Eschgfäller, Random functions from coupled dynamical systems, arXiv preprint arXiv:1609.01750 [math.CO], 2016. See Example 3.11.
J. Berstel, Axel Thue's papers on repetitions in words: a translation, July 21 1994. Publications du LaCIM, Département de mathématiques et d'informatique 20, Université du Québec à Montréal, 1995, 85 pages. [Cached copy]
J.-F. Bertazzon, Resolution of an integral equation with the Thue-Morse sequence, arXiv:1201.2502v1 [math.CO], Jan 12, 2012.
J. Cooper and A. Dutle, Greedy Galois Games, Amer. Math. Mnthly, 120 (2013), 441-451.
Françoise Dejean, Sur un Théorème de Thue, J. Combinatorial Theory, vol. 13 A, iss. 1 (1972) 90-99.
F. Michel Dekking, Morphisms, Symbolic sequences, and their Standard Forms, arXiv:1509.00260 [math.CO], 2015.
F. M. Dekking, The Thue-Morse Sequence in Base 3/2, J. Int. Seq., Vol. 26 (2023), Article 23.2.3.
A. de Luca and S. Varricchio, Some combinatorial properties of the Thue-Morse sequence and a problem in semigroups, Theoret. Comput. Sci. 63 (1989), 333-348.
E. Deutsch and B. E. Sagan, Congruences for Catalan and Motzkin numbers and related sequences, J. Num. Theory 117 (2006), 191-215.
M. Drmota, C. Mauduit and J. Rivat, The Thue-Morse Sequence Along The Squares is Normal, Abstract, ÖMG-DMV Congress, 2013.
Arthur Dolgopolov, Equitable Sequencing and Allocation Under Uncertainty, Preprint, 2016.
J. Endrullis, D. Hendriks and J. W. Klop, Degrees of streams, Journal of Integers B 11 (2011): 1-40..
A. S. Fraenkel, New games related to old and new sequences, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004.
Hao Fu and G.-N. Han, Computer assisted proof for Apwenian sequences related to Hankel determinants, arXiv preprint arXiv:1601.04370 [math.NT], 2016.
Maciej Gawro and Maciej Ulas, "On formal inverse of the Prouhet-Thue-Morse sequence." Discrete Mathematics 339.5 (2016): 1459-1470. Also arXiv:1601.04840, 2016.
Daniel Goc, Luke Schaeffer and Jeffrey Shallit, The Subword Complexity of k-Automatic Sequences is k-Synchronized, arXiv 1206.5352 [cs.FL], Jun 28 2012.
G. A. Hedlund, Remarks on the work of Axel Thue on sequences, Nordisk Mat. Tid., 15 (1967), 148-150.
Dimitri Hendriks, Frits G. W. Dannenberg, Jorg Endrullis, Mark Dow and Jan Willem Klop, Arithmetic Self-Similarity of Infinite Sequences, arXiv preprint 1201.3786 [math.CO], 2012.
A. M. Hinz, S. Klavžar, U. Milutinović and C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 79. Website for book
Tanya Khovanova, There are no coincidences, arXiv preprint 1410.2193 [math.CO], 2014.
Clark Kimberling, Intriguing infinite words composed of zeros and ones, Elemente der Mathematik (2021).
Naoki Kobayashi, Kazutaka Matsuda and Ayumi Shinohara, Functional Programs as Compressed Data, Higher-Order and Symbolic Computation, 25, no. 1 (2012): 39-84..
Philip Lafrance, Narad Rampersad and Randy Yee, Some properties of a Rudin-Shapiro-like sequence, arXiv:1408.2277 [math.CO], 2014.
C. Mauduit and J. Rivat, La somme des chiffres des carrés, Acta Mathem. 203 (1) (2009) 107-148.
Harold Marston Morse, Recurrent geodesics on a surface of negative curvature, Trans. Amer. Math. Soc., 22 (1921), 84-100.
F. Mignosi, A. Restivo, and M. Sciortino, Words and forbidden factors, WORDS (Rouen, 1999). Theoret. Comput. Sci. 273 (2002), no. 1-2, 99--117. MR1872445 (2002m:68096).
Marston Morse, A solution of the problem of infinite play in chess, (review), Bull. Amer. Math. Soc., 44 (No. 9, 1938), p. 632. [Mentions an application to chess]
K. Nakano, Shall We Juggle, Coinductively?, in Certified Programs and Proofs, Lecture Notes in Computer Science Volume 7679, 2012, pp. 160-172.
Hieu D. Nguyen, A mixing of Prouhet-Thue-Morse sequences and Rademacher functions, arXiv preprint arXiv:1405.6958 [math.NT], 2014.
Hieu D. Nguyen, A Generalization of the Digital Binomial Theorem , J. Int. Seq. 18 (2015) # 15.5.7.
C. D. Offner, Repetitions of Words and the Thue-Morse sequence. Preprint, no date.
Matt Parker, The Fairest Sharing Sequence Ever, YouTube video, Nov 27 2015
A. Parreau, M. Rigo, E. Rowland and E. Vandomme, A new approach to the 2-regularity of the l-abelian complexity of 2-automatic sequences, arXiv preprint arXiv:1405.3532 [cs.FL], 2014.
C. A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," Zentralblatt review
E. Prouhet, Mémoire sur quelques relations entre les puissances des nombres, Comptes Rendus Acad. des Sciences, 33 (No. 8, 1851), p. 225. [Said to implicitly mention this sequence]
Michel Rigo, Relations on words, arXiv preprint arXiv:1602.03364 [cs.FL], 2016.
Luke Schaeffer and Jeffrey Shallit, Closed, Palindromic, Rich, Privileged, Trapezoidal, and Balanced Words in Automatic Sequences, Electronic Journal of Combinatorics 23(1) (2016), #P1.25.
M. R. Schroeder & N. J. A. Sloane, Correspondence, 1991
R. Schroeppel and R. W. Gosper, HACKMEM #122 (1972).
Vladimir Shevelev, Two analogs of Thue-Morse sequence, arXiv preprint arXiv:1603.04434 [math.NT], 2016-2017.
L. Spiegelhofer, Normality of the Thue-Morse Sequence along Piatetski-Shapiro sequences, Quart. J. Math. 66 (3) (2015).
Hassan Tarfaoui, Concours Général 1990 - Exercice 1 (in French).
Eric Weisstein's World of Mathematics, Thue-Morse Sequence
Eric Weisstein's World of Mathematics, Thue-Morse Constant
Eric Weisstein's World of Mathematics, Parity
Joost Winter, Marcello M. Bonsangue, and Jan J. M. M. Rutten, Context-free coalgebras, Journal of Computer and System Sciences, 81.5 (2015): 911-939.
Hans Zantema, Complexity of Automatic Sequences, International Conference on Language and Automata Theory and Applications (LATA 2020): Language and Automata Theory and Applications, 260-271.
FORMULA
a(2n) = a(n), a(2n+1) = 1 - a(n), a(0) = 0. Also, a(k+2^m) = 1 - a(k) if 0 <= k < 2^m.
If n = Sum b_i*2^i is the binary expansion of n then a(n) = Sum b_i (mod 2).
Let S(0) = 0 and for k >= 1, construct S(k) from S(k-1) by mapping 0 -> 01 and 1 -> 10; sequence is S(infinity).
G.f.: (1/(1 - x) - Product_{k >= 0} (1 - x^(2^k)))/2. - Benoit Cloitre, Apr 23 2003
a(0) = 0, a(n) = (n + a(floor(n/2))) mod 2; also a(0) = 0, a(n) = (n - a(floor(n/2))) mod 2. - Benoit Cloitre, Dec 10 2003
a(n) = -1 + (Sum_{k=0..n} binomial(n,k) mod 2) mod 3 = -1 + A001316(n) mod 3. - Benoit Cloitre, May 09 2004
Let b(1) = 1 and b(n) = b(ceiling(n/2)) - b(floor(n/2)) then a(n-1) = (1/2)*(1 - b(2n-1)). - Benoit Cloitre, Apr 26 2005
a(n) = 1 - A010059(n) = A001285(n) - 1. - Ralf Stephan, Jun 20 2003
a(n) = A001969(n) - 2n. - Franklin T. Adams-Watters, Aug 28 2006
a(n) = A115384(n) - A115384(n-1) for n > 0. - Reinhard Zumkeller, Aug 26 2007
For n >= 0, a(A004760(n+1)) = 1 - a(n). - Vladimir Shevelev, Apr 25 2009
a(A160217(n)) = 1 - a(n). - Vladimir Shevelev, May 05 2009
a(n) == A000069(n) (mod 2). - Robert G. Wilson v, Jan 18 2012
a(n) = A000035(A000120(n)). - Omar E. Pol, Oct 26 2013
a(n) = A000035(A193231(n)). - Antti Karttunen, Dec 27 2013
a(n) + A181155(n-1) = 2n for n >= 1. - Clark Kimberling, Oct 06 2014
G.f. A(x) satisfies: A(x) = x / (1 - x^2) + (1 - x) * A(x^2). - Ilya Gutkovskiy, Jul 29 2021
From Bernard Schott, Jan 21 2022: (Start)
a(n) = a(n*2^k) for k >= 0.
a((2^m-1)^2) = (1-(-1)^m)/2 (see Hassan Tarfaoui link, Concours Général 1990). (End)
EXAMPLE
The evolution starting at 0 is:
0
0, 1
0, 1, 1, 0
0, 1, 1, 0, 1, 0, 0, 1
0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0
0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1
.......
A_2 = 0 1 1 0, so B_2 = 1 0 0 1 and A_3 = A_2 B_2 = 0 1 1 0 1 0 0 1.
From Joerg Arndt, Mar 12 2013: (Start)
The first steps of the iterated substitution are
Start: 0
Rules:
0 --> 01
1 --> 10
-------------
0: (#=1)
0
1: (#=2)
01
2: (#=4)
0110
3: (#=8)
01101001
4: (#=16)
0110100110010110
5: (#=32)
01101001100101101001011001101001
6: (#=64)
0110100110010110100101100110100110010110011010010110100110010110
(End)
From Omar E. Pol, Oct 28 2013: (Start)
Written as an irregular triangle in which row lengths is A011782, the sequence begins:
0;
1;
1,0;
1,0,0,1;
1,0,0,1,0,1,1,0;
1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1;
1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0;
It appears that: row j lists the first A011782(j) terms of A010059, with j >= 0; row sums give A166444 which is also 0 together with A011782; right border gives A000035.
(End)
MAPLE
s := proc(k) local i, ans; ans := [ 0, 1 ]; for i from 0 to k do ans := [ op(ans), op(map(n->(n+1) mod 2, ans)) ] od; return ans; end; t1 := s(6); A010060 := n->t1[n]; # s(k) gives first 2^(k+2) terms.
a := proc(k) b := [0]: for n from 1 to k do b := subs({0=[0, 1], 1=[1, 0]}, b) od: b; end; # a(k), after the removal of the brackets, gives the first 2^k terms. # Example: a(3); gives [[[[0, 1], [1, 0]], [[1, 0], [0, 1]]]]
A010060:=proc(n)
add(i, i=convert(n, base, 2)) mod 2 ;
end proc:
seq(A010060(n), n=0..104); # Emeric Deutsch, Mar 19 2005
map(`-`, convert(StringTools[ThueMorse](1000), bytes), 48); # Robert Israel, Sep 22 2014
MATHEMATICA
Table[ If[ OddQ[ Count[ IntegerDigits[n, 2], 1]], 1, 0], {n, 0, 100}];
mt = 0; Do[ mt = ToString[mt] <> ToString[(10^(2^n) - 1)/9 - ToExpression[mt] ], {n, 0, 6} ]; Prepend[ RealDigits[ N[ ToExpression[mt], 2^7] ] [ [1] ], 0]
Mod[ Count[ #, 1 ]& /@Table[ IntegerDigits[ i, 2 ], {i, 0, 2^7 - 1} ], 2 ] (* Harlan J. Brothers, Feb 05 2005 *)
Nest[ Flatten[ # /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 7] (* Robert G. Wilson v Sep 26 2006 *)
a[n_] := If[n == 0, 0, If[Mod[n, 2] == 0, a[n/2], 1 - a[(n - 1)/2]]] (* Ben Branman, Oct 22 2010 *)
a[n_] := Mod[Length[FixedPointList[BitAnd[#, # - 1] &, n]], 2] (* Jan Mangaldan, Jul 23 2015 *)
Table[2/3 (1 - Cos[Pi/3 (n - Sum[(-1)^Binomial[n, k], {k, 1, n}])]), {n, 0, 100}] (* or, for version 10.2 or higher *) Table[ThueMorse[n], {n, 0, 100}] (* Vladimir Reshetnikov, May 06 2016 *)
ThueMorse[Range[0, 100]] (* The program uses the ThueMorse function from Mathematica version 11 *) (* Harvey P. Dale, Aug 11 2016 *)
PROG
(Haskell)
a010060 n = a010060_list !! n
a010060_list =
0 : interleave (complement a010060_list) (tail a010060_list)
where complement = map (1 - )
interleave (x:xs) ys = x : interleave ys xs
-- Doug McIlroy (doug(AT)cs.dartmouth.edu), Jun 29 2003
-- Edited by Reinhard Zumkeller, Oct 03 2012
(PARI) a(n)=if(n<1, 0, sum(k=0, length(binary(n))-1, bittest(n, k))%2)
(PARI) a(n)=if(n<1, 0, subst(Pol(binary(n)), x, 1)%2)
(PARI) default(realprecision, 6100); x=0.0; m=20080; for (n=1, m-1, x=x+x; x=x+sum(k=0, length(binary(n))-1, bittest(n, k))%2); x=2*x/2^m; for (n=0, 20000, d=floor(x); x=(x-d)*2; write("b010060.txt", n, " ", d)); \\ Harry J. Smith, Apr 28 2009
(PARI) a(n)=hammingweight(n)%2 \\ Charles R Greathouse IV, Mar 22 2013
(Python)
A010060_list = [0]
for _ in range(14):
A010060_list += [1-d for d in A010060_list] # Chai Wah Wu, Mar 04 2016
(Python)
def A010060(n): return n.bit_count()&1 # Chai Wah Wu, Mar 01 2023
(R)
maxrow <- 8 # by choice
b01 <- 1
for(m in 0:maxrow) for(k in 0:(2^m-1)){
b01[2^(m+1)+ k] <- b01[2^m+k]
b01[2^(m+1)+2^m+k] <- 1-b01[2^m+k]
}
(b01 <- c(0, b01))
# Yosu Yurramendi, Apr 10 2017
CROSSREFS
Cf. A001285 (for 1, 2 version), A010059 (for 1, 0 version), A106400 (for +1, -1 version), A048707. A010060(n)=A000120(n) mod 2.
Cf. A007413, A080813, A080814, A036581, A108694. See also the Thue (or Roth) constant A014578, also A014571.
Run lengths give A026465. Backward first differences give A029883.
Cf. A004128, A053838, A059448, A171900, A161916, A214212, A005942 (subword complexity), A010693 (Abelian complexity), A225186 (squares), A228039 (a(n^2)), A282317.
Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.
KEYWORD
nonn,core,easy,nice
AUTHOR
STATUS
approved
page 1 2 3 4 5 6 7 8 9

Search completed in 0.073 seconds

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 August 29 17:19 EDT 2024. Contains 375518 sequences. (Running on oeis4.)