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!)
A275202 Subword complexity (number of distinct blocks of length n) of the period doubling sequence A096268. 5

%I #35 Aug 09 2022 07:05:59

%S 2,3,5,6,8,10,11,12,14,16,18,20,21,22,23,24,26,28,30,32,34,36,38,40,

%T 41,42,43,44,45,46,47,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,

%U 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,161,162,163,164,165

%N Subword complexity (number of distinct blocks of length n) of the period doubling sequence A096268.

%H Jinyuan Wang, <a href="/A275202/b275202.txt">Table of n, a(n) for n = 1..1000</a>

%H Scott Balchin and Dan Rust, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Rust/rust3.html">Computations for Symbolic Substitutions</a>, Journal of Integer Sequences, Vol. 20 (2017), Article 17.4.1.

%H Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, <a href="http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf">Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications</a>, Preprint, 2016.

%H Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, <a href="https://doi.org/10.1145/3127585">Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications</a>, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585.

%F a(n) = A005942(n+1)/2, and the latter satisfies a simple recurrence. - _N. J. A. Sloane_, Jun 04 2019

%F Proof: let b(n) = A096268(n) and c(n) = b(2n+1). For n >= 2, distinct blocks of length 2n are of the form 0_0_...0_ or _0_0..._0, and distinct blocks of length 2n-1 are of the form 0_0_..._0 or _0_0...0_. Therefore, a(2n) is twice the n-subword complexity of {c(k)}, and a(2n-1) is the sum of (n-1)-subword complexity and n-subword complexity of {c(k)}. Note that n-subword complexity of {c(k)} is a(n) because c(2k) = b(4k+1) = 1, c(4k+1) = b(8k+3) = b(2k) = 0 and c(4k+3) = b(8k+7) = b(2k+1) = c(k). In conclusion, a(2n) = 2a(n) and a(2n-1) = a(n-1) + a(n), with a(1) = 2 and a(2) = 3. So a(n) = A005942(n+1)/2. - _Jinyuan Wang_, Feb 27 2020

%e For n = 1 there are two words {0,1}.

%e For n = 2 there are three words {00,01,10}.

%e For n = 3 there are five words {000,001,010,100,101}.

%p a := proc(n) option remember; if n = 1 then 2 elif n = 2 then 3 else a(iquo(n,2)) + a(iquo(n+1,2)) end if; end proc:

%p seq(a(n), n = 1..100); # _Peter Bala_, Aug 05 2022

%t t = Nest[Flatten[# /. {0 -> {1, 0}, 1 -> {0, 0}}] &, {1}, 12]; Table[2^n - Count[SequencePosition[t, #] & /@ Tuples[{0, 1}, n], {}], {n, 16}] (* _Michael De Vlieger_, Jul 19 2016, Version 10.1, after _Robert G. Wilson v_ at A096268 *)

%o (PARI) lista(nn) = {my(v=vector(nn-nn%2)); v[1]=2; v[2]=3; for(n=2, nn\2, v[2*n-1]=v[n-1]+v[n]; v[2*n]=2*v[n]); v; } \\ _Jinyuan Wang_, Feb 27 2020

%o (PARI) a(n) = my(k=logint(n,2)-1); if(bittest(n,k), n + 2<<k, n<<1 - 1<<k); \\ _Kevin Ryde_, Aug 09 2022

%Y Cf. A006165, A096268, A035263, A005942.

%K nonn,easy

%O 1,1

%A _Daniel Rust_, Jul 19 2016

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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)