[seqfan] Re: Rigidity of an okapi

M. F. Hasler seqfan at hasler.fr
Tue Apr 9 03:58:10 CEST 2019


On Fri, Mar 22, 2019 at 9:51 PM Éric Angelini wrote:

> This sequence alternates odd and even digits,
> -- and so do the "first additions" when they are considered as a sequence.
>
> I need help to correct and extend S

(which should be the lexicographically first "okapi" seq with no duplicated
> term):
> S = 1,29,21,49,23,27,25,45,47,43,2967,63,2947,65,...
> "First additions" are:
> F = 30,50,70,72,50,52,70,92,90,3010,3030,3010,3012,...
>

My program produces:
S = 1, 29, 21, 49, 23, 27, 25, 45, 47, 43, 258, 12, 18, 14, 16, 34, 36, 38,
32, 58, ...
with "first additions"
F =  30, 50, 70, 72, 50, 52, 70, 92, 90, 301, 270, 30, 32, 30, 50, 70, 74,
70, 90, ...

This seems to obey the rules and come earlier than the suggested S
(in view of S(11) = 258 instead of 2967).
But maybe I missed something ... ?

In case my sequence is correct,  this S(11) would answer:


> A question I cannot answer: will a 3-digit term appear at some point?


and actually also:

> Another one:
> Is it possible to start an "okapi sequence" with a(1) = 2?
>

Indeed, it seems that the terms after S(11)=258 could also follow a(1)=2:
a = 2, 12, 18, 14, 16, 34, 36, 38, 32, 58, 123, 87, 214, 56, 125, 85, 216,
54, 127, 83, 218, 52, 129, 81, 2929, 89, 212, 78, ...
with F(a) = 14, 30, 32, 30, 50, 70, 74, 70, 90, 181, 210, 301, 270, 181,
210, 301, 270, 181, 210, 301, 270, 181, 210, 3010, 3018, 301, 290, ...

- Maximilian

\\ experimental PARI code
okapi(N=99,a=1,U=[])={ local(T,S, good(t)=if(
t>T*98\99,T*=10;T*10\99+(t<11)*11,
for(p=1,oo, t+=10^p; t\10^p%10>1 && return(t); t>=T&&break); (t+2*T*=10)\10)
)/*end my*/; while( N>#U=setunion(U,[a]), print1(a","); my( t=1-a%2); T=10;
while( (t+=2)%10>1 || t=good(t), if( !setsearch(U,t) &&
setsearch([[1],[2]], Set(digits(fromdigits(concat(S,digits(a+t)%2),2),4))),
S=2-(a+t)%2; a=t; next(2))));a}
okapi(99,1,[2,4,6,8,103,105,107,109])
okapi(99,2,[3,5,7,9,10,103,105,107,109])



More information about the SeqFan mailing list