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!)
A365076 Number of length-n binary words x such that the infinite word xxxx... is balanced. 1
2, 4, 8, 12, 22, 22, 44, 44, 62, 64, 112, 78, 158, 130, 148, 172, 274, 184, 344, 232, 302, 334, 508, 302, 522, 472, 548, 474, 814, 442, 932, 684, 778, 820, 904, 672, 1334, 1030, 1100, 904, 1642, 904, 1808, 1222, 1282, 1522, 2164, 1198, 2102, 1564, 1912, 1728 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A binary word w is "balanced" if for all lengths and all blocks b of the same length appearing in it, the number of 1's in b can take only two different values. For example, 00111 is not balanced because 00 has no 1's, 01 has one, and 11 has two.
LINKS
Laurent Vuillon, Balanced words, Bull. Belg. Math. Soc. Simon Stevin 10(5): 787-805 (December 2003).
FORMULA
a(n) = 2*A057661(n).
a(n) = A057660(n) + 1.
EXAMPLE
For n = 4, the 12 such words are 0000, 0001, 0010, 0100, 0101, 0111 and their bitwise binary complements.
PROG
(Python)
from math import gcd
def A365076(n): return sum(n//gcd(n, k) for k in range(1, n+1))+1 # Chai Wah Wu, Aug 24 2023
CROSSREFS
Sequence in context: A217694 A027677 A103787 * A327480 A330022 A362261
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Aug 20 2023
STATUS
approved

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 July 4 04:06 EDT 2024. Contains 373986 sequences. (Running on oeis4.)