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.

A366462 a(n) is the length of the longest word w in the Period-doubling sequence (A096268) in which every length-n factor of w is unique.

Original entry on oeis.org

2, 4, 7, 9, 11, 15, 17, 19, 21, 23, 25, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161
Offset: 1

Views

Author

Gandhar Joshi, Oct 24 2023

Keywords

Comments

So far, all the values in the list except the first two are odd numbers.

Examples

			For n=3, the length of the longest word in the Period-doubling sequence that admits only unique length-3 factors is a(3) = 7 (attained by word 1000101 and its reversal).
		

Crossrefs

Cf. A096268, A275202 (subword complexity).

Programs

  • PARI
    \\ See links.
  • Walnut
    def pdfactoreq "At (t PD[i+t]=PD[j+t]"; % Check if two length-n factors of Period-doubling sequence at positions i and j are equal; PD is predefined in Walnut as the DFA that recognises the Period-doubling sequence. %
    def PD_w_len_N_unique_factors "Ei (Aj, k (i<=j & j<(i+n-N) & j ~$pdfactoreq(j, k, N))": % Find lengths of words with length-N unique factors; must replace N with a constant %
    def longest_len_N "$PD_w_len_N_unique_factors(n) & Am (m>n) => ~$PD_w_len_N_unique_factors(m)"; % Check the longest of the lengths found in previous line; must replace N with the same constant %