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.
%I A289676 #28 Jul 09 2025 04:19:54 %S A289676 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 A289676 116,250,231,210,462,459,438,960,990,966,2069,2114,2089,4296,4237, %U A289676 4155,8485,8234,8032,16496,16054,15657,32041,31280,30325,61700,60252,58379,118357,115810,112885 %N A289676 a(n) = A289670(n)/2^f(n), where f(n) = 2*floor((n-1)/3) + ((n+2) mod 3). %C A289676 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 A289676 (Python) %o A289676 from __future__ import division %o A289676 def A289676(n): %o A289676 c, k, r, n2, cs, ts = 0, 1+(n-1)//3, 2**((n-1) % 3), 2**(n-1), set(), set() %o A289676 for i in range(2**k): %o A289676 j, l = int(bin(i)[2:],8)*r, n2 %o A289676 traj = set([(l,j)]) %o A289676 while True: %o A289676 if j >= l: %o A289676 j = j*16+13 %o A289676 l *= 2 %o A289676 else: %o A289676 j *= 4 %o A289676 l //= 2 %o A289676 if l == 0: %o A289676 c += 1 %o A289676 ts |= traj %o A289676 break %o A289676 j %= 2*l %o A289676 if (l,j) in traj: %o A289676 cs |= traj %o A289676 break %o A289676 if (l,j) in cs: %o A289676 break %o A289676 if (l,j) in ts: %o A289676 c += 1 %o A289676 break %o A289676 traj.add((l,j)) %o A289676 return c # _Chai Wah Wu_, Aug 03 2017 %Y A289676 Cf. A284116, A284119, A284121, A289670, A289671, A289672, A289673, A289674, A289675, A289677. %Y A289676 Cf. also A290436-A290441. %K A289676 nonn %O A289676 1,1 %A A289676 _N. J. A. Sloane_, Aug 01 2017 %E A289676 Corrected by _Don Reble_, Aug 01 2017 (there were errors in A289670)