Displaying 1-10 of 105 results found.
page
1
2
3
4
5
6
7
8
9
10
11
1, 4, 7, 11, 13, 16, 19, 21, 25, 28, 31, 35, 37, 41, 44, 47, 49, 52, 55, 59, 61, 64, 67, 69, 73, 76, 79, 81, 84, 87, 91, 93, 97, 100, 103, 107, 109, 112, 115, 117, 121, 124, 127, 131, 133, 137, 140, 143, 145, 148, 151, 155, 157, 161, 164, 167, 171, 173, 176, 179, 181
COMMENTS
The number of odd numbers before the n-th even number in this sequence is a(n). - Philippe Deléham, Mar 27 2004
MATHEMATICA
A036554 := Select[Range[70500], OddQ[IntegerExponent[#, 2]] &]; Table[ A036554[[2*n - 1]]/2, {n, 1, 100}] (* G. C. Greubel, Jan 14 2018 *)
3, 5, 9, 12, 15, 17, 20, 23, 27, 29, 33, 36, 39, 43, 45, 48, 51, 53, 57, 60, 63, 65, 68, 71, 75, 77, 80, 83, 85, 89, 92, 95, 99, 101, 105, 108, 111, 113, 116, 119, 123, 125, 129, 132, 135, 139, 141, 144, 147, 149, 153, 156, 159, 163, 165, 169, 172, 175, 177, 180, 183
COMMENTS
The number of odd numbers before the n-th even number in this sequence is a(n). - Philippe Deléham, Mar 27 2004
a(n) = 3*n^2 + 2*n - 4 * Sum_{k=1..n} A003159(k).
+20
6
1, 0, 1, 4, 5, 4, 1, 0, 1, 0, 1, 4, 5, 8, 13, 16, 17, 16, 17, 20, 21, 20, 17, 16, 17, 16, 13, 8, 5, 4, 1, 0, 1, 0, 1, 4, 5, 4, 1, 0, 1, 0, 1, 4, 5, 8, 13, 16, 17, 16, 17, 20, 21, 24, 29, 32, 37, 44, 49, 52, 53, 56, 61, 64, 65, 64, 65, 68, 69, 68, 65, 64, 65, 64, 65, 68, 69, 72, 77, 80
COMMENTS
0 <= a(n) <= n for any n.
Minimal increasing sequence with a(1)=3 and the property that a(n) and n are both in or both not in A003159.
+20
5
3, 6, 7, 9, 11, 14, 15, 18, 19, 22, 23, 25, 27, 30, 31, 33, 35, 38, 39, 41, 43, 46, 47, 50, 51, 54, 55, 57, 59, 62, 63, 66, 67, 70, 71, 73, 75, 78, 79, 82, 83, 86, 87, 89, 91, 94, 95, 97, 99, 102, 103, 105, 107, 110, 111, 114, 115, 118, 119, 121, 123, 126, 127, 129, 131, 134
COMMENTS
The primes in this sequence give A160216.
Conjecture: Let m>3 belong to A003159. Define the sequence b(n) to be the minimal increasing sequence with b(1)=m and the property that b(n) and n are both in or both not in A003159. Then a(n)=b(n) for all n larger than some m-dependent minimum index.
EXAMPLE
n=2 is not in A003159. So a(2) is the smallest number larger than a(1)=3 which is not in A003159. This excludes 4 and 5 which are in A003159 and leads to a(2)=6.
MATHEMATICA
a35263[n_] := 1 - Mod[IntegerExponent[n, 2], 2];
a[1] = 3; a[n_] := a[n] = For[k = a[n - 1] + 1, True, k++, If[a35263[k] == a35263[n], Return[k]]];
PROG
(PARI) is(n) = valuation(n, 2)%2==0; \\ A003159
nexta(a, n) = {my(k=a+1, isn = is(n)); while (is(k) != isn, k++); k; };
lista(nn) = {my(a = 3); print1(a, ", "); for (n=2, nn, a = nexta(a, n); print1(a, ", "); ); } \\ Michel Marcus, Dec 15 2018
G.f.: 1 + 2*Sum_{k >= 1} (-1)^k*q^ A003159(k).
+20
4
1, -2, 0, 2, -2, 2, 0, -2, 0, 2, 0, -2, 2, -2, 0, 2, -2, 2, 0, -2, 2, -2, 0, 2, 0, -2, 0, 2, -2, 2, 0, -2, 0, 2, 0, -2, 2, -2, 0, 2, 0, -2, 0, 2, -2, 2, 0, -2, 2, -2, 0, 2, -2, 2, 0, -2, 0, 2, 0, -2, 2, -2, 0, 2, -2, 2, 0, -2, 2, -2, 0, 2, 0, -2, 0, 2, -2
FORMULA
Andrews-Newman (2017) give many properties of this series.
MATHEMATICA
Join[{1}, Differences[(-1)^ThueMorse[Range[0, 100]]]] (* Paolo Xausa, Dec 18 2023 *)
1, 3, 5, 6, 9, 10, 13, 14, 15, 18, 20, 21, 23, 24, 26, 28, 31, 33, 34, 36, 37, 39, 42, 43, 45, 47, 49, 51, 53, 54, 56, 58, 59, 61, 63, 64, 67, 69, 71, 73, 74, 76, 78, 80, 81, 83, 84, 86, 88, 91, 92, 94, 96, 97, 99, 101, 103, 105, 107, 109, 110, 112, 114, 116, 118, 120, 122, 123, 125, 127, 129, 131, 132, 135, 136, 138, 140
MATHEMATICA
jointRank[{seqA_, seqB_}]:={Flatten@Position[#1, {_, 1}], Flatten@Position[#1, {_, 2}]}&[Sort@Flatten[{{#1, 1}&/@seqA, {#1, 2}&/@seqB}, 1]]
seqA=DeleteCases[Array[#1 Boole[OddQ[Length[NestWhileList[#1/2&, #1, EvenQ]]]]&, {500}], 0]; (* A003159*)
A187417=FixedPoint[jointRank[{seqA, #1[[1]]}]&, jointRank[{seqA, {}}]][[1]]
A187418=Complement[Range[Max[#]], #]&[FixedPoint[jointRank[{seqA, #1[[1]]}]&, jointRank[{seqA, {}}]][[1]]]
1, 4, 8, 13, 20, 29, 40, 52, 65, 80, 96, 113, 132, 152, 173, 196, 221, 248, 276, 305, 336, 369, 404, 440, 477, 516, 557, 600, 644, 689, 736, 784, 833, 884, 936, 989, 1044, 1101, 1160, 1220, 1281, 1344, 1408, 1473, 1540, 1608, 1677, 1748, 1821, 1896, 1972, 2049
MATHEMATICA
Accumulate @ Select[Range[100], EvenQ[IntegerExponent[#, 2]] &] (* Amiram Eldar, Jan 16 2022 *)
1, 0, 1, 2, 1, 0, -1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0, -1, 0, 1, 0, -1, -2, -1, 0, -1, 0, 1, 0, 1, 2, 1, 0, -1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0, -1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0, -1, 0, 1, 0, -1, -2, -1, 0, -1, 0, 1, 0, 1, 2, 1, 0, -1, 0, 1, 0, -1, -2, -1, 0, -1, -2, -3, -2, -1, -2
COMMENTS
a(n) = 0 for n = 2,6,8,10,18,22,24,26,30,32, ....It seems that a(n)/log(n) is bounded. What are the values of lim (-) n ->infinity a(n)/log(n) and lim(+) n ->infinity a(n)/log(n) ?
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
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
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.
Max A. Alekseyev and N. J. A. Sloane, On Kaprekar's Junction Numbers, arXiv:2112.14365, 2021; Journal of Combinatorics and Number Theory 12:3 (2022), 115-155.
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 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. Endrullis, D. Hendriks and J. W. Klop, Degrees of streams, Journal of Integers B 11 (2011): 1-40..
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.
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).
C. A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," Zentralblatt review
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
G.f. A(x) satisfies: A(x) = x / (1 - x^2) + (1 - x) * A(x^2). - Ilya Gutkovskiy, Jul 29 2021
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.
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)
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;
(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]]]]
add(i, i=convert(n, base, 2)) mod 2 ;
end proc:
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 *)
Nest[Join[#, 1 - #] &, {0}, 7] (* Paolo Xausa, Oct 25 2024 *)
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
(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
(Python)
for _ in range(14):
(Python)
(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))
CROSSREFS
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.
Squarefree part of n: a(n) is the smallest positive number m such that n/m is a square.
+10
298
1, 2, 3, 1, 5, 6, 7, 2, 1, 10, 11, 3, 13, 14, 15, 1, 17, 2, 19, 5, 21, 22, 23, 6, 1, 26, 3, 7, 29, 30, 31, 2, 33, 34, 35, 1, 37, 38, 39, 10, 41, 42, 43, 11, 5, 46, 47, 3, 1, 2, 51, 13, 53, 6, 55, 14, 57, 58, 59, 15, 61, 62, 7, 1, 65, 66, 67, 17, 69, 70, 71, 2, 73, 74, 3, 19, 77
COMMENTS
Also called core(n). [Not to be confused with the squarefree kernel of n, A007947.]
This is an arithmetic function and is undefined if n <= 0.
A note on square roots of numbers: we can write sqrt(n) = b*sqrt(c) where c is squarefree. Then b = A000188(n) is the "inner square root" of n, c = A007913(n), lcm( A007947(b),c) = A007947(n) = "squarefree kernel" of n and bc = A019554(n) = "outer square root" of n. [Corrected by M. F. Hasler, Mar 01 2018]
If n > 1, the quantity f(n) = log(n/core(n))/log(n) satisfies 0 <= f(n) <= 1; f(n) = 0 when n is squarefree and f(n) = 1 when n is a perfect square. One can define n as being "epsilon-almost squarefree" if f(n) < epsilon. - Kurt Foster (drsardonicus(AT)earthlink.net), Jun 28 2008
a(n) is the smallest natural number m such that product of geometric mean of the divisors of n and geometric mean of the divisors of m are integers. Geometric mean of the divisors of number n is real number b(n) = Sqrt(n). a(n) = 1 for infinitely many n. a(n) = 1 for numbers from A000290: a( A000290(n)) = 1. For n = 8; b(8) = sqrt(8), a(n) = 2 because b(2) = sqrt(2); sqrt(8) * sqrt(2) = 4 (integer). - Jaroslav Krizek, Apr 26 2010
Booker, Hiary, & Keating outline a method for bounding (on the GRH) a(n) for large n using L-functions. - Charles R Greathouse IV, Feb 01 2013
According to the formula a(n) = n/ A000188(n)^2, the scatterplot exhibits the straight lines y=x, y=x/4, y=x/9, ..., i.e., y=x/k^2 for all k=1,2,3,... - M. F. Hasler, May 08 2014
a(n) = 1 if n is a square, a(n) = n if n is a product of distinct primes. - Zak Seidov, Jan 30 2016
All solutions of the Diophantine equation n*x=y^2 or, equivalently, G(n,x)=y, with G being the geometric mean, are of the form x=k^2*a(n), y=k*sqrt(n*a(n)), where k is a positive integer. - Stanislav Sykora, Feb 03 2016
If f is a multiplicative function then Sum_{d divides n} f(a(d)) is also multiplicative. For example, A010052(n) = Sum_{d divides n} mu(a(d)) and A046951(n) = Sum_{d divides n} mu(a(d)^2). - Peter Bala, Jan 24 2024
FORMULA
Dirichlet g.f.: zeta(2s)*zeta(s-1)/zeta(2s-2). - R. J. Mathar, Feb 11 2011
a(n) = n/( Sum_{k=1..n} floor(k^2/n)-floor((k^2 -1)/n) )^2. - Anthony Browne, Jun 06 2016
a(n) = rad(n)/a(n/rad(n)), where rad = A007947. This recurrence relation together with a(1) = 1 generate the sequence. - Velin Yanev, Sep 19 2017
(End)
Theorems proven by Copil and Panaitopol (2007):
Lim sup_{n->oo} a(n+1)-a(n) = oo.
Lim inf_{n->oo} a(n+1)-a(n) = -oo.
Sum_{k=1..n} 1/a(k) ~ c*sqrt(n) + O(log(n)), where c = zeta(3/2)/zeta(3) ( A090699). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/30 = 0.328986... . - Amiram Eldar, Oct 25 2022
MAPLE
A007913 := proc(n) local f, a, d; f := ifactors(n)[2] ; a := 1 ; for d in f do if type(op(2, d), 'odd') then a := a*op(1, d) ; end if; end do: a; end proc: # R. J. Mathar, Mar 18 2011
# second Maple program:
a:= n-> mul(i[1]^irem(i[2], 2), i=ifactors(n)[2]):
seq(n / expand(numtheory:-nthpow(n, 2)), n=1..77); # Peter Luschny, Jul 12 2022
MATHEMATICA
data = Table[Sqrt[n], {n, 1, 100}]; sp = data /. Sqrt[_] -> 1; sfp = data/sp /. Sqrt[x_] -> x (* Artur Jasinski, Nov 03 2008 *)
Table[Times@@Power@@@({#[[1]], Mod[ #[[2]], 2]}&/@FactorInteger[n]), {n, 100}] (* Zak Seidov, Apr 08 2009 *)
Table[{p, e} = Transpose[FactorInteger[n]]; Times @@ (p^Mod[e, 2]), {n, 100}] (* T. D. Noe, May 20 2013 *)
Sqrt[#] /. (c_:1)*a_^(b_:0) -> (c*a^b)^2& /@ Range@100 (* Bill Gosper, Jul 18 2015 *)
PROG
(PARI) a(n)=core(n)
(Haskell)
a007913 n = product $
zipWith (^) (a027748_row n) (map (`mod` 2) $ a124010_row n)
(Python)
from sympy import factorint, prod
return prod(p for p, e in factorint(n).items() if e % 2)
(Sage)
[squarefree_part(n) for n in (1..77)] # Peter Luschny, Feb 04 2015
Search completed in 0.106 seconds
|