OFFSET
1,5
COMMENTS
a(2^m)=0; i.e. for all nonnegative integers m, the longest words w with no length-(2^m) subwords of w repeated are the prefixes of length A366462(2^m) of the Period doubling sequence.
LINKS
Kevin Ryde, Table of n, a(n) for n = 1..8192
Kevin Ryde, PARI/GP Code
EXAMPLE
PROG
(Walnut)
def pdfaceq "At (t<n) => 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 "Aj, k (i<=j & j<(i+n-N) & j<k & k<(i+n-N+1)) => ~$pdfaceq(j, k, N)": % Find lengths and positions of words with length-N unique factors; must replace N with a constant %
def pd_longest_len_N "$pd_w_len_N_unique_factors(i, n) & Am (m>n) => ~$pd_w_len_N_unique_factors(i, m)"; % Check the longest of the lengths of words defined in the line above; must replace N with the same constant %
def pd_longest_len_N_fpos "$pd_longest_len_N(i, M) & Aj (j<i) => ~$pd_longest_len_N(j, M)"; % This finds the first positions of the longest words required; must replace M with A366462(N).%
(PARI) See links.
CROSSREFS
KEYWORD
nonn
AUTHOR
Gandhar Joshi, Nov 08 2023
STATUS
approved