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.

A100833 Smallest positive palindrome-free and squarefree sequence.

This page as a plain text file.
%I A100833 #9 Jan 18 2019 01:23:15
%S A100833 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,
%T A100833 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,
%U A100833 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
%N A100833 Smallest positive palindrome-free and squarefree sequence.
%C A100833 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.
%H A100833 Robert Israel, <a href="/A100833/b100833.txt">Table of n, a(n) for n = 1..10000</a>
%F A100833 Conjectures from _Robert Israel_, Jan 17 2019: (Start)
%F A100833 a(n) = 1 if n == 1 (mod 3).
%F A100833 a(n) = 2 if n == 2 (mod 3).
%F A100833 Otherwise a(n) = 3 + A007814(n/3). (End)
%p A100833 B[1]:= 1: B[2]:= 2:
%p A100833 for n from 3 to 200 do
%p A100833   for c from 1 do
%p A100833     if B[n-1]=c or B[n-2]=c then next fi;
%p A100833     Cs:= ListTools:-Reverse(select(t -> B[t]=c, [$ceil(n/2)..n-3]));
%p A100833     good:= true;
%p A100833     for k in Cs do
%p A100833       if andmap(t -> (B[k-t]=B[n-t]),[$1..n-k-1]) then good:= false; break fi
%p A100833     od;
%p A100833     if good then B[n]:= c; break fi;
%p A100833   od;
%p A100833 od:
%p A100833 seq(B[i],i=1..200); # _Robert Israel_, Jan 17 2019
%Y A100833 Cf. A007814.
%K A100833 nonn
%O A100833 1,2
%A A100833 _John W. Layman_, Jan 07 2005