login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A026491 a(n) = least k > a(n-1) such that A001285(k-1) = A001285(n-1) for n >= 1. 3
1, 4, 5, 8, 10, 12, 13, 16, 17, 20, 21, 24, 26, 28, 29, 32, 34, 36, 37, 40, 42, 44, 45, 48, 49, 52, 53, 56, 58, 60, 61, 64, 65, 68, 69, 72, 74, 76, 77, 80, 81, 84, 85, 88, 90, 92, 93, 96, 98, 100, 101, 104, 106, 108, 109, 112, 113, 116, 117 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n+1)-a(n) = A171900(n+2) for n>=1. - Michel Dekking, Apr 11 2019
MAPLE
N:= 200: # for terms <= N
S:= StringTools:-ThueMorse(N):
R:= 1: r:= 1:
for n from 1 do
j:= SearchText(S[n], S, r+1..-1);
if j = 0 then break fi;
R:= R, r+j;
r:= r+j;
if r >= N then break fi;
od:
R; # Robert Israel, Apr 11 2019
# alternative
A026491 := proc(n)
option remember ;
local f, k ;
if n = 0 then
1;
else
f := A001285(n-1) ;
for k from procname(n-1)+1 do
if A001285(k-1) = f then
return k;
end if;
end do:
end if;
end proc:
seq(A026491(n), n=0..40) ; # R. J. Mathar, Jun 24 2021
MATHEMATICA
a[n_] := a[n] = If[n==0, 1, For[k = a[n-1]+1, True, k++, If[ThueMorse[k-1]==ThueMorse[n-1], Return[k]]]];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Sep 16 2022 *)
CROSSREFS
Sequence in context: A346302 A190200 A162902 * A347476 A255491 A344955
KEYWORD
nonn
AUTHOR
EXTENSIONS
Clarified NAME with respect to A001285 offsets. - R. J. Mathar, Jun 24 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)