cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A093914 a(1) = 1; for n > 1, a(n) = curling number of (b(1),...,b(n-1)), where b() = Thue-Morse sequence A010060 (with offset changed to 1).

This page as a plain text file.
%I A093914 #22 Oct 18 2024 11:42:53
%S A093914 1,1,1,2,1,1,2,2,1,2,1,2,2,1,2,2,1,2,2,2,1,2,2,2,2,2,1,2,2,1,2,2,1,2,
%T A093914 2,2,2,1,2,2,1,2,2,2,2,1,2,2,2,2,2,2,1,2,2,2,2,2,1,2,2,1,2,2,1,2,2,2,
%U A093914 2,2,2,2,2,2,1,2,2,1,2,2,1,2,2,2,2,2,2,2,2,2,1,2,2,1,2,2,2,2,2,2
%N A093914 a(1) = 1; for n > 1, a(n) = curling number of (b(1),...,b(n-1)), where b() = Thue-Morse sequence A010060 (with offset changed to 1).
%C A093914 The curling number of a finite string S = (s(1),...,s(n)) is the largest integer k such that S can be written as xy^k for strings x and y (where y has positive length).
%C A093914 From _Andrey Zabolotskiy_, Mar 03 2017: (Start)
%C A093914 The sequence consists of 1's and 2's only.
%C A093914 If 2^k>=n-1, then a(n+2^k)>=a(n).
%C A093914 The density of 1's seems to converge to 1/6.
%C A093914 (End)
%H A093914 Andrey Zabolotskiy, <a href="/A093914/b093914.txt">Table of n, a(n) for n = 1..16384</a>
%H A093914 F. J. van de Bult, D. C. Gijswijt, J. P. Linderman, N. J. A. Sloane and Allan Wilks, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Sloane/sloane55.html">A Slow-Growing Sequence Defined by an Unusual Recurrence</a>, J. Integer Sequences, Vol. 10 (2007), #07.1.2.
%H A093914 F. J. van de Bult, D. C. Gijswijt, J. P. Linderman, N. J. A. Sloane and Allan Wilks, A Slow-Growing Sequence Defined by an Unusual Recurrence [<a href="http://neilsloane.com/doc/gijs.pdf">pdf</a>, <a href="http://neilsloane.com/doc/gijs.ps">ps</a>].
%H A093914 <a href="/index/Cu#curling_numbers">Index entries for sequences related to curling numbers</a>
%t A093914 (* Function curlN is defined in A094840 *)
%t A093914 (* Function ThueMorse needs Mma version >= 11 *)
%t A093914 a[n_] := If[n == 1, 1, curlN[Array[ThueMorse, n-1, 0]]];
%t A093914 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Oct 18 2024 *)
%o A093914 (Python)
%o A093914 p, tm, s = 8, 0, 1
%o A093914 for i in range(p):
%o A093914     tm += (tm^((1<<s)-1))<<s
%o A093914     s *= 2
%o A093914 print(1)
%o A093914 for i in range(1, 1<<p):
%o A093914     a = any(((tm>>(i-j))&((1<<j)-1)) == ((tm>>(i-2*j))&((1<<j)-1)) for j in range(1, i//2+1))
%o A093914     print(2 if a else 1)
%o A093914 # _Andrey Zabolotskiy_, Mar 03 2017
%Y A093914 Cf. A090822, A094840, A010060.
%K A093914 nonn
%O A093914 1,4
%A A093914 _N. J. A. Sloane_, May 26 2004