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!)
A289676 a(n) = A289670(n)/2^f(n), where f(n) = 2*floor((n-1)/3) + ((n+2) mod 3). 6

%I #26 Sep 23 2021 01:27:18

%S 2,1,1,2,2,1,4,4,3,5,4,3,10,13,12,21,18,20,43,40,39,85,71,64,146,132,

%T 116,250,231,210,462,459,438,960,990,966,2069,2114,2089,4296,4237,

%U 4155,8485,8234,8032,16496,16054,15657,32041,31280,30325,61700,60252,58379,118357,115810,112885

%N a(n) = A289670(n)/2^f(n), where f(n) = 2*floor((n-1)/3) + ((n+2) mod 3).

%C This is the number of distinct binary words w of length n that terminate under the Post tag system (see A284116, A289670) reduced to take into account the observation made by _Don Reble_ that (if the bits of w are labeled from the left starting at bit 0) bits 1,2,4,5,7,8,... (not a multiple of 3) are "junk DNA" and have no effect on the outcome.

%o (Python)

%o from __future__ import division

%o def A289676(n):

%o c, k, r, n2, cs, ts = 0, 1+(n-1)//3, 2**((n-1) % 3), 2**(n-1), set(), set()

%o for i in range(2**k):

%o j, l = int(bin(i)[2:],8)*r, n2

%o traj = set([(l,j)])

%o while True:

%o if j >= l:

%o j = j*16+13

%o l *= 2

%o else:

%o j *= 4

%o l //= 2

%o if l == 0:

%o c += 1

%o ts |= traj

%o break

%o j %= 2*l

%o if (l,j) in traj:

%o cs |= traj

%o break

%o if (l,j) in cs:

%o break

%o if (l,j) in ts:

%o c += 1

%o break

%o traj.add((l,j))

%o return c # _Chai Wah Wu_, Aug 03 2017

%Y Cf. A284116, A284119, A284121, A289670, A289671, A289672, A289673, A289674, A289675, A289677.

%Y Cf. also A290436-A290441.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Aug 01 2017; corrected by _Don Reble_, Aug 01 2017 (there were errors in A289670).

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 September 16 15:31 EDT 2024. Contains 375976 sequences. (Running on oeis4.)