(Translated by https://www.hiragana.jp/)
A010060 -id:A010060 - OEIS
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: a010060 -id:a010060
Displaying 1-10 of 568 results found. page 1 2 3 4 5 6 7 8 9 10 ... 57
     Sort: relevance | references | number | modified | created      Format: long | short | data
A316828 Image of the Thue-Morse sequence A010060 under the morphism {1 -> 1,2; 0 -> 0,2}. +20
23
0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
The morphism is applied just once.
This is a word that is pure morphic and uniform primitive morphic, but neither pure uniform morphic nor pure primitive morphic.
A010060 interleaved with A007395. - Antti Karttunen, Oct 08 2018
LINKS
Jean-Paul Allouche, Julien Cassaigne, Jeffrey Shallit, Luca Q. Zamboni, A Taxonomy of Morphic Sequences, arXiv preprint arXiv:1711.10807, Nov 29 2017
FORMULA
If n is odd, a(n) = 2, otherwise a(n) = A010060(n/2). - Antti Karttunen, Oct 08 2018
MATHEMATICA
Riffle[ThueMorse[Range[0, 100]], 2] (* Paolo Xausa, Dec 18 2023 *)
PROG
(PARI) A316828(n) = if(n%2, 2, hammingweight(n/2)%2); \\ Antti Karttunen, Oct 08 2018
CROSSREFS
Cf. A010060.
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
AUTHOR
N. J. A. Sloane, Jul 14 2018
STATUS
approved
A115384 Partial sums of Thue-Morse numbers A010060. +20
22
0, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9, 9, 10, 10, 11, 12, 12, 12, 13, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18, 18, 19, 20, 20, 20, 21, 22, 22, 23, 23, 23, 24, 24, 25, 26, 26, 27, 27, 27, 28, 29, 29, 29, 30, 30, 31, 32, 32, 33, 33, 33, 34, 34, 35, 36, 36, 36, 37, 38, 38 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Hassan Tarfaoui, Concours Général 1990 - Exercice 1 (in French).
FORMULA
a(n) = Sum_{k=0..n} A010060(k)^2.
a(n+1) = A115382(2n, n).
a(n)/n -> 1/2; a(n) = number of odious numbers <= n, see A000069. - Reinhard Zumkeller, Aug 26 2007, corrected by M. F. Hasler, May 22 2017.
a(n) = Sum_{i=1..n} (S2(n) mod 2), where S2 = binary weight; lim a(n)/n = 1/2. More generally, consider a(n) = Sum_{i=1..n} (F(Sk(n)) mod m), where Sk(n) is sum of digits of n, n in base k; F(t) is an arithmetic function; m integer. How does lim a(n)/n depend on F(t)? - Ctibor O. Zizka, Feb 25 2008
a(n) = n + 1 - A159481(n). - Reinhard Zumkeller, Apr 16 2009
a(n) = floor((n+1)/2)+(1+(-1)^n)*(1-(-1)^A000120(n))/4. - Vladimir Shevelev, May 27 2009
G.f.: (1/(1 - x)^2 - Product_{k>=1} (1 - x^(2^k)))/2. - Ilya Gutkovskiy, Apr 03 2019
a(n) = A026430(n+1) - n - 1. - Michel Dekking, Sep 17 2019
a(2n+1) = n+1 (see Hassan Tarfaoui link, Concours Général 1990). - Bernard Schott, Jan 21 2022
MATHEMATICA
Accumulate[Nest[Flatten[#/.{0->{0, 1}, 1->{1, 0}}]&, {0}, 7]] (* Peter J. C. Moses, Apr 15 2013 *)
Accumulate[ThueMorse[Range[0, 100]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 02 2017 *)
PROG
(PARI) a(n)=n\2 + (n%2 || hammingweight(n+1)%2==0) \\ Charles R Greathouse IV, Mar 22 2013
(Python)
def A115384(n): return (n>>1)+(n&1|((n+1).bit_count()&1^1)) # Chai Wah Wu, Mar 01 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jan 21 2006
EXTENSIONS
Edited by M. F. Hasler, May 22 2017
STATUS
approved
A026465 Length of n-th run of identical symbols in the Thue-Morse sequence A010060 (or A001285). +20
19
1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
It appears that the sequence can be calculated by any of the following methods:
(1) Start with 1 and repeatedly replace 1 with 1, 2, 1 and 2 with 1, 2, 2, 2, 1;
(2) a(1) = 1, all terms are either 1 or 2 and, for n > 0, a(n) = 1 if the length of the n-th run of 2's is 1; a(n) = 2 if the length of the n-th run of consecutive 2's is 3, with each run of 2's separated by a run of two 1's;
(3) replace each 3 in A080426 with 2. - John W. Layman, Feb 18 2003
Number of representations of n as a sum of Jacobsthal numbers (1 is allowed twice as a part). Partial sums are A003159. With interpolated zeros, g.f. is (Product_{k>=1} (1 + x^A078008(k)))/2. - Paul Barry, Dec 09 2004
In other words, the consecutive 0's or 1's in A010060 or A010059. - Robin D. Saunders (saunders_robin_d(AT)hotmail.com), Sep 06 2006
From Carlo Carminati, Feb 25 2011: (Start)
The sequence (starting with the second term) can also be calculated by the following method:
Apply repeatedly to the string S_0 = [2] the following algorithm: take a string S, double it, if the last figure is 1, just add the last figure to the previous one, if the last figure is greater than one, decrease it by one unit and concatenate a figure 1 at the end. (This algorithm is connected with the interpretation of the sequence as a continued fraction expansion.) (End)
This sequence, starting with the second term, happens to be the continued fraction expansion of the biggest cluster point of the set {x in [0,1]: F^k(x) >= x, for all k in N}, where F denotes the Farey map (see A187061). - Carlo Carminati, Feb 28 2011
Starting with the second term, the fixed point of the substitution 2 -> 211, 1 -> 2. - Carlo Carminati, Mar 03 2011
It appears that this sequence contains infinitely many distinct palindromic subsequences. - Alexander R. Povolotsky, Oct 30 2016
From Michel Dekking, Feb 13 2019: (Start)
Let tau defined by tau(0) = 01, tau(1) = 10 be the Thue-Morse morphism, with fixed point A010060. Consecutive runs in A010060 are 0, 11, 0, 1, 00, 1, 1, ..., which are coded by their lengths 1, 2, 1, 1, 2, ... Under tau^2 consecutive runs are mapped to consecutive runs:
tau^2(0) = 0110, tau^2(1) = 1001,
tau^2(00) = 01100110, tau^2(11) = 10011001.
The reason is that (by definition of a run!) runs of 0's and runs of 1's alternate in the sequence of runs, and this is inherited by the image of these runs under tau^2.
Under tau^2 the runs of length 1 are mapped to the sequence 1,2,1 of run lengths, and the runs of length 2 are mapped to the sequence 1,2,2,2,1 of run lengths. This proves John Layman's conjecture number (1): it follows that (a(n)) is fixed point of the morphism alpha
alpha: 1 -> 121, 2 -> 12221.
Since alpha(1) and alpha(2) are both palindromes, this also proves Alexander Povolotsky's conjecture.
(End)
LINKS
J.-P. Allouche, Andre Arnold, Jean Berstel, Srecko Brlek, William Jockusch, Simon Plouffe and Bruce E. Sagan, A sequence related to that of Thue-Morse, Discrete Math., Vol. 139, No. 1-3 (1995), pp. 455-461.
G. Allouche, J.-P. Allouche and J. Shallit, Kolam indiens, dessins sur le sable aux îles Vanuatu, courbe de Sierpinski et morphismes de monoïde, Ann. Inst. Fourier (Grenoble), Vol. 56, No. 7 (2006), pp. 2115-2130.
Claudio Bonanno, Carlo Carminati, Stefano Isola and Giulio Tiozzo, Dynamics of continued fractions and kneading sequences of unimodal maps, arXiv:1012.2131 [math.DS], 2010-2012.
Srećko Brlek, Enumeration of factors in the Thue-Morse word, Discrete Applied Math., Vol. 24, No. 1-3 (1989), pp. 83-96.
Julien Cassaigne, Limit values of the recurrence quotient of Sturmian sequences, Theoret. Comput. Sci., Vol. 218, No. 1 (1999), pp. 3-12.
Artūras Dubickas, On the distance from a rational power to the nearest integer, Journal of Number Theory, Vol. 117, No. 1 (March 2006), pp. 222-239.
Artūras Dubickas, On a sequence related to that of Thue-Morse and its applications, Discrete Math., Vol. 307, No. 9-10 (2007), pp. 1082-1093. MR2292537 (2008b:11086).
Cor Kraaikamp, Thomas A. Schmidt and Wolfgang Steiner, Natural extensions and entropy of alpha-continued fractions, arXiv:1011.4283 [math.DS], 2010-2012.
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003. Apparently unpublished. This is a scanned copy of the version that the author sent to me in 2003. - N. J. A. Sloane, Sep 09 2018. See page 2.
Kevin Ryde, PARI/GP Code
Jeffrey Shallit, Automaticity IV: Sequences, sets, and diversity, J. Théor. Nombres Bordeaux, Vol. 8, No. 2 (1996), pp. 347-367. See page 354.
FORMULA
a(1) = 1; for n > 1, a(n) = A003159(n) - A003159(n-1). - Benoit Cloitre, May 31 2003
G.f.: Product_{k>=1} (1 + x^A001045(k)). - Paul Barry, Dec 09 2004
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Jan 16 2022
MAPLE
# From Carlo Carminati, Feb 25 2011:
## period-doubling routine:
double:=proc(SS)
NEW:=[op(S), op(S)]:
if op(nops(NEW), NEW)=1
then NEW:=[seq(op(j, NEW), j=1..nops(NEW)-2), op(nops(NEW)-1, NEW)+1]:
else NEW:=[seq(op(j, NEW), j=1..nops(NEW)-1), op(nops(NEW)-1, NEW)-1, 1]:
fi:
end proc:
# 10 loops of the above routine generate the first 1365 terms of the sequence
# (except for the initial term):
S:=[2]:
for j from 1 to 10 do S:=double(S); od:
S;
# From N. J. A. Sloane, Dec 31 2013:
S:=[b]; M:=14;
for n from 1 to M do T:=subs({b=[b, a, a], a=[b]}, S);
S := map(x->op(x), T); od:
T:=subs({a=1, b=2}, S): T:=[1, op(T)]: [seq(T[n], n=1..40)];
MATHEMATICA
Length /@ Split@ Nest[ Flatten@ Join[#, # /. {1 -> 2, 2 -> 1}] &, {1}, 7]
NestList[ Flatten[# /. {1 -> {2}, 2 -> {1, 1, 2}}] &, {1}, 7] // Flatten (* Robert G. Wilson v, May 20 2014 *)
PROG
(Haskell)
import Data.List (group)
a026465 n = a026465_list !! (n-1)
a026465_list = map length $ group a010060_list
-- Reinhard Zumkeller, Jul 15 2014
(PARI) See links.
CROSSREFS
Cf. A010060, A001285, A101615, A026490 (run lengths).
A080426 is an essentially identical sequence with another set of constructions.
Cf. A104248 (bisection odious), A143331 (bisection evil), A003159 (partial sums).
Cf. A187061, A363361 (as continued fraction).
KEYWORD
nonn,eigen
AUTHOR
EXTENSIONS
Corrected and extended by John W. Layman, Feb 18 2003
Definition revised by N. J. A. Sloane, Dec 30 2013
STATUS
approved
A014571 Consider the Morse-Thue sequence (A010060) as defining a binary constant and convert it to decimal. +20
17
4, 1, 2, 4, 5, 4, 0, 3, 3, 6, 4, 0, 1, 0, 7, 5, 9, 7, 7, 8, 3, 3, 6, 1, 3, 6, 8, 2, 5, 8, 4, 5, 5, 2, 8, 3, 0, 8, 9, 4, 7, 8, 3, 7, 4, 4, 5, 5, 7, 6, 9, 5, 5, 7, 5, 7, 3, 3, 7, 9, 4, 1, 5, 3, 4, 8, 7, 9, 3, 5, 9, 2, 3, 6, 5, 7, 8, 2, 5, 8, 8, 9, 6, 3, 8, 0, 4, 5, 4, 0, 4, 8, 6, 2, 1, 2, 1, 3, 3, 3, 9, 6, 2, 5, 6 (list; constant; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
This constant is transcendental (Mahler, 1929). - Amiram Eldar, Nov 14 2020
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 6.8 Prouhet-Thue-Morse Constant, p. 437.
LINKS
Boris Adamczewski and Yann Bugeaud, A short proof of the transcendence of Thue-Morse continued fractions, The American Mathematical Monthly, Vol. 114, No. 6 (2007), pp. 536-540; alternative link.
Jean-Paul Allouche and Jeffrey Shallit, The ubiquitous Prouhet-Thue-Morse sequence, in: C. Ding, T. Helleseth, and H. Niederreiter (eds.), Sequences and their applications, Springer, London, 1999, pp. 1-16; alternative link.
Joerg Arndt, Matters Computational (The Fxtbook), p.726 ff.
Arturas Dubickas, On the distance from a rational power to the nearest integer, Journal of Number Theory, Volume 117, Issue 1, March 2006, Pages 222-239.
Kurt Mahler, Arithmetische Eigenschaften der Lösungen einer Klasse von Funktionalgleichungen, Mathematische Annalen, Vol. 101 (1929), pp. 342-366, alternative link.
R. Schroeppel and R. W. Gosper, HACKMEM #122 (1972).
Eric Weisstein's World of Mathematics, Thue-Morse Constant.
FORMULA
Equals Sum_{k>=0} A010060(n)*2^(-(k+1)). [Corrected by Jianing Song, Oct 27 2018]
Equals Sum_{k>=1} 2^(-(A000069(k)+1)). - Jianing Song, Oct 27 2018
From Amiram Eldar, Nov 14 2020: (Start)
Equals 1/2 - (1/4) * A215016.
Equals 1/(3 - 1/A247950). (End)
EXAMPLE
0.412454033640107597783361368258455283089...
In hexadecimal, .6996966996696996... .
MAPLE
A014571 := proc()
local nlim, aold, a ;
nlim := ilog2(10^Digits) ;
aold := add( A010060(n)/2^n, n=0..nlim) ;
a := 0.0 ;
while abs(a-aold) > abs(a)/10^(Digits-3) do
aold := a;
nlim := nlim+200 ;
a := add( A010060(n)/2^n, n=0..nlim) ;
od:
evalf(%/2) ;
end:
A014571() ; # R. J. Mathar, Mar 03 2008
MATHEMATICA
digits = 105; t[0] = 0; t[n_?EvenQ] := t[n] = t[n/2]; t[n_?OddQ] := t[n] = 1-t[(n-1)/2]; FromDigits[{t /@ Range[digits*Log[10]/Log[2] // Ceiling], -1}, 2] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Feb 20 2014 *)
1/2-1/4*Product[1-2^(-2^k), {k, 0, Infinity}] // N[#, 105]& // RealDigits // First (* Jean-François Alcover, May 15 2014, after Steven Finch *)
(* ThueMorse function needs $Version >= 10.2 *)
P = FromDigits[{ThueMorse /@ Range[0, 400], 0}, 2];
RealDigits[P, 10, 105][[1]] (* Jean-François Alcover, Jan 30 2020 *)
PROG
(PARI) default(realprecision, 20080); x=0.0; m=67000; for (n=1, m-1, x=x+x; x=x+sum(k=0, length(binary(n))-1, bittest(n, k))%2); x=10*x/2^m; for (n=0, 20000, d=floor(x); x=(x-d)*10; write("b014571.txt", n, " ", d)); \\ Harry J. Smith, Apr 25 2009
(PARI) 1/2-prodinf(n=0, 1-1.>>2^n)/4 \\ Charles R Greathouse IV, Jul 31 2012
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
EXTENSIONS
Corrected and extended by R. J. Mathar, Mar 03 2008
STATUS
approved
A161579 Positions n such that A010060(n) = A010060(n+3). +20
14
0, 1, 3, 4, 6, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 22, 24, 25, 27, 28, 30, 32, 33, 35, 36, 38, 40, 41, 43, 44, 45, 47, 48, 49, 51, 52, 54, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 70, 72, 73, 75, 76, 77, 79, 80, 81, 83, 84, 86, 88, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104, 105, 107 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Or: union of A131323 with the sequence of terms of the form A131323(n)-2, and with the sequence of terms of the form A036554(n)-2.
Conjecture: In every sequence of numbers n such that A010060(n)=A010060(n+k), for fixed odd k, the odious (A000069) and evil (A001969) terms alternate. - Vladimir Shevelev, Jul 31 2009
LINKS
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.
V. Shevelev, Equations of the form t(x+a)=t(x) and t(x+a)=1-t(x) for Thue-Morse sequence arXiv:0907.0880 [math.NT], 2009-2012. [Vladimir Shevelev, Jul 31 2009]
FORMULA
Equals {A001477} \ {A161580}.
MATHEMATICA
tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] == tm[n+3], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
PROG
(PARI) is(n)=hammingweight(n)%2==hammingweight(n+3)%2 \\ Charles R Greathouse IV, Aug 20 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Jun 14 2009
EXTENSIONS
More terms from R. J. Mathar, Aug 17 2009
STATUS
approved
A161580 Positions n such that A010060(n) + A010060(n+3) = 1. +20
13
2, 5, 7, 10, 14, 18, 21, 23, 26, 29, 31, 34, 37, 39, 42, 46, 50, 53, 55, 58, 62, 66, 69, 71, 74, 78, 82, 85, 87, 90, 93, 95, 98, 101, 103, 106, 110, 114, 117, 119, 122, 125, 127, 130, 133, 135, 138, 142, 146, 149, 151, 154, 157, 159, 162, 165, 167, 170, 174, 178, 181, 183, 186 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: In every sequence of numbers n such that A010060(n) + A010060(n+k) = 1, for fixed odd k, the odious (A000069) and evil (A001969) terms alternate. [From Vladimir Shevelev, Jul 31 2009]
LINKS
V. Shevelev,Equations of the form t(x+a)=t(x) and t(x+a)=1-t(x) for Thue-Morse sequence arXiv:0907.0880 [math.NT], 2009-2012. [Vladimir Shevelev, Jul 31 2009]
FORMULA
MATHEMATICA
tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] + tm[n+3] == 1, Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
PROG
(PARI) is(n)=hammingweight(n)%2+hammingweight(n+3)%2==1 \\ Charles R Greathouse IV, Mar 22 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jun 14 2009
EXTENSIONS
More terms from R. J. Mathar, Aug 17 2009
STATUS
approved
A161627 Positions n such that A010060(n)=A010060(n+4). +20
13
4, 5, 6, 7, 20, 21, 22, 23, 28, 29, 30, 31, 36, 37, 38, 39, 52, 53, 54, 55, 68, 69, 70, 71, 84, 85, 86, 87, 92, 93, 94, 95, 100, 101, 102, 103, 116, 117, 118, 119, 124, 125, 126, 127, 132, 133, 134, 135, 148, 149, 150, 151, 156, 157, 158, 159, 164, 165, 166, 167, 180, 181, 182 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Or: union of the numbers of the form 4*A079523(n)+k, k=0, 1, 2, or 3.
Locates patterns of the form 1xxx1 or 0xxx0 in the Thue-Morse sequence.
LINKS
J.-P. Allouche, Thue, Combinatorics on words, and conjectures inspired by the Thue-Morse sequence, arXiv preprint arXiv:1401.3727 [math.NT], 2014.
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.
V. Shevelev, Equations of the form t(x+a)=t(x) and t(x+a)=1-t(x) for Thue-Morse sequence arXiv:0907.0880 [math.NT], 2009-2012. [From Vladimir Shevelev, Jul 31 2009]
MATHEMATICA
tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] == tm[n+4], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
SequencePosition[ThueMorse[Range[200]], {x_, _, _, _, x_}][[All, 1]] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Apr 16 2017 *)
PROG
(PARI) is(n)=hammingweight(n)%2==hammingweight(n+4)%2 \\ Charles R Greathouse IV, Aug 20 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jun 15 2009
EXTENSIONS
Extended by R. J. Mathar, Aug 28 2009
STATUS
approved
A161639 Positions n such that A010060(n) = A010060(n+8). +20
13
8, 9, 10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45, 46, 47, 56, 57, 58, 59, 60, 61, 62, 63, 72, 73, 74, 75, 76, 77, 78, 79, 104, 105, 106, 107, 108, 109, 110, 111, 136, 137, 138, 139, 140, 141, 142, 143, 168, 169, 170, 171, 172, 173, 174, 175, 184, 185, 186, 187, 188, 189 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Locates correlations of the form 1xxxxxxx1 or 0xxxxxxx0 in the Thue-Morse sequence.
Or: union of numbers 8*A079523(n)+k, k=0, 1, 2, 3, 4, 5, 6, or 7.
Generalization: the numbers n such that A010060(n) = A010060(n+2^m) constitute the union of sequences {2^m*A079523(n)+k}, k=0,1,...,2^m-1.
LINKS
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.
V. Shevelev, Equations of the form t(x+a)=t(x) and t(x+a)=1-t(x) for Thue-Morse sequence arXiv:0907.0880 [math.NT], 2009-2012. [Vladimir Shevelev, Jul 31 2009]
MATHEMATICA
tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] == tm[n+8], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
SequencePosition[ThueMorse[Range[0, 200]], {x_, _, _, _, _, _, _, _, x_}][[All, 1]]-1 (* Harvey P. Dale, Jul 23 2021 *)
PROG
(PARI) is(n)=hammingweight(n)%2==hammingweight(n+8)%2 \\ Charles R Greathouse IV, Aug 20 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Jun 15 2009
EXTENSIONS
Duplicate of 174 removed by R. J. Mathar, Aug 28 2009
STATUS
approved
A161641 Positions n such that A010060(n) + A010060(n+4) = 1. +20
9
0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 24, 25, 26, 27, 32, 33, 34, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 88, 89, 90, 91, 96, 97, 98, 99, 104, 105, 106, 107, 108 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Also union of all numbers of the form A131323(n)-k, k=0, 1, 2, or 3.
LINKS
FORMULA
MATHEMATICA
tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n - 1)/2]; Reap[For[n = 0, n <= 16000, n++, If[tm[n] + tm[n + 4] == 1, Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 01 2018 *)
PROG
(PARI) is(n)=hammingweight(n)%2!=hammingweight(n+4)%2 \\ Charles R Greathouse IV, Aug 20 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jun 15 2009
EXTENSIONS
More terms from R. J. Mathar, Aug 17 2009
STATUS
approved
A019300 First n elements of Thue-Morse sequence A010060 read as a binary number. +20
8
0, 1, 3, 6, 13, 26, 52, 105, 211, 422, 844, 1689, 3378, 6757, 13515, 27030, 54061, 108122, 216244, 432489, 864978, 1729957, 3459915, 6919830, 13839660, 27679321, 55358643, 110717286, 221434573, 442869146, 885738292, 1771476585, 3542953171 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(0) = 0, a(n+1) = 2a(n) + A010060(n). - Ralf Stephan, Sep 16 2003
MATHEMATICA
With[{tm=Nest[Flatten[#/.{0->{0, 1}, 1->{1, 0}}]&, {0}, 7]}, Table[ FromDigits[ Take[tm, n], 2], {n, 40}]] (* Harvey P. Dale, Mar 25 2015 *)
PROG
(Scheme)
(define rdc(lambda(x)(if(null? (cdr x))'()(cons (car x) (rdc (cdr x))))))
; if a bit is 1, get 2^i, where i is the index of that bit from right-left
(define F (lambda (c i)(if (eq? c #\1) (expt 2 i) 0)))
; gathers the sum of 2^index for all indices corresponding to a 1
(define fn (lambda (x sum i stop)(if (eq? i stop) sum (fn (list->string (rdc (string->list x))) (+ sum (F (string-ref x (-(string-length x) 1)) i)) (+ i 1)stop))))
(define f (lambda (x)(fn (substring thue 0 (+ x 1)) 0 0 (string-length (substring thue 0 (+ x 1))) )))
(define thue "0110100110010110") ; Feel free to add Thue-Morse sequence of whatever length here
; Ariel S Koiman, May 07 2013
(PARI) a(n)=sum(k=1, n, (hammingweight(k)%2)<<(n-k)) \\ Charles R Greathouse IV, May 08 2016
(PARI) first(n)=my(v=vector(n)); v[1]=1; for(k=2, n, v[k]=2*v[k-1]+hammingweight(k)%2); concat(0, v) \\ Charles R Greathouse IV, May 08 2016
CROSSREFS
Cf. A010060, A048707, A320916 (bit reversal).
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
page 1 2 3 4 5 6 7 8 9 10 ... 57

Search completed in 0.280 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 26 07:40 EDT 2024. Contains 375454 sequences. (Running on oeis4.)