OFFSET
1,3
COMMENTS
An antiperiod of a length-n string x is a divisor d of n such that if you factor x as the concatenation of (n/d) blocks of length d, then all these blocks are distinct.
k*2^k (A036289(k)) is the largest number n that makes a(n) = k. - Jinyuan Wang, Feb 15 2019
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..10000
G. Fici, A. Restivo, M. Silva, and L. Q. Zamboni, Anti-powers in infinite words, arxiv preprint, 1606.02868v1 [cs.DM], June 9 2016.
FORMULA
a(n) is the smallest divisor d of n such that n/d <= 2^d.
MATHEMATICA
a[n_] := Do[If[n/d <= 2^d, Return[d]], {d, Divisors[n]}];
Array[a, 106] (* Jean-François Alcover, Feb 15 2019 *)
PROG
(PARI) a(n) = fordiv(n, d, if (n/d <= 2^d, return (d))); \\ Michel Marcus, Feb 15 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jun 23 2016
STATUS
approved