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.

A230127 Number of binary strings of length n avoiding "squares" (that is, repeated blocks of the form xx) with |x| > 1.

This page as a plain text file.
%I A230127 #25 Nov 10 2021 15:25:19
%S A230127 1,2,4,8,12,20,26,38,42,52,56,56,48,42,32,22,10,4,2,0,0,0,0,0,0,0,0,0,
%T A230127 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U A230127 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N A230127 Number of binary strings of length n avoiding "squares" (that is, repeated blocks of the form xx) with |x| > 1.
%C A230127 Entringer et al. showed that a(n) = 0 for all n >= 19.
%H A230127 Nathaniel Johnston, <a href="/A230127/a230127.c.txt">C code for computing this sequence</a>
%H A230127 R. C. Entringer, D. E. Jackson and J. A. Schatz, <a href="http://dx.doi.org/10.1016/0097-3165(74)90041-7">On nonrepetitive sequences</a>, J. Combin. Theory Ser. A. 16 (1974), 159-164.
%e A230127 a(4) = 12 because there are 16 binary strings of length 4, but 4 of these strings (namely 0000, 0101, 1010, and 1111) repeat a substring of length 2. Thus a(4) = 16 - 4 = 12.
%e A230127 a(18) = 2 because there are 2 strings of length 18 not containing any "squares" of length greater than 1: 010011000111001101 and 101100111000110010.
%t A230127 a[n_] := a[n] = Select[PadLeft[#, n]& /@ IntegerDigits[Range[0, 2^n-1], 2], {} == SequencePosition[#, {b__, b__} /; Length[{b}]>1, 1]&] // Length;
%t A230127 Table[Print[n, " ", a[n]]; a[n], {n, 0, 20}] (* _Jean-François Alcover_, Nov 10 2021 *)
%Y A230127 Cf. A022087, A229614, A230177.
%K A230127 nonn,fini,full
%O A230127 0,2
%A A230127 _Nathaniel Johnston_, Oct 10 2013