login
A100833
Smallest positive palindrome-free and squarefree sequence.
2
1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 5, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 6, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 5, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 7, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 5, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 6, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 5, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 2, 8, 1, 2, 3, 1, 2, 4, 1, 2, 3
OFFSET
1,2
COMMENTS
a(1)=1 and, for n>1, a(n) is the smallest positive integer such that no subsequence of two or more consecutive terms is a palindrome and no subsequence of 2k consecutive terms, k>=1, consists of two copies of the same subsequence.
LINKS
FORMULA
Conjectures from Robert Israel, Jan 17 2019: (Start)
a(n) = 1 if n == 1 (mod 3).
a(n) = 2 if n == 2 (mod 3).
Otherwise a(n) = 3 + A007814(n/3). (End)
MAPLE
B[1]:= 1: B[2]:= 2:
for n from 3 to 200 do
for c from 1 do
if B[n-1]=c or B[n-2]=c then next fi;
Cs:= ListTools:-Reverse(select(t -> B[t]=c, [$ceil(n/2)..n-3]));
good:= true;
for k in Cs do
if andmap(t -> (B[k-t]=B[n-t]), [$1..n-k-1]) then good:= false; break fi
od;
if good then B[n]:= c; break fi;
od;
od:
seq(B[i], i=1..200); # Robert Israel, Jan 17 2019
CROSSREFS
Cf. A007814.
Sequence in context: A176506 A200596 A088422 * A097293 A296656 A303945
KEYWORD
nonn
AUTHOR
John W. Layman, Jan 07 2005
STATUS
approved