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 A305378 #17 Jun 13 2018 10:01:35 %S A305378 1,3,5,8,10,12,16,18,20,22,25,27,33,35,37,40,42,44,48,50,52,54,65,67, %T A305378 69,72,74,76,80,82,84,86,89,91,97,99,101,104,106,108,128,130,132,134, %U A305378 137,139,141,145,147,149,152,154,160,162,164,166,169,171,173,177,179,181,192,194,196,198,201 %N A305378 Tribonacci representation of 2n+1, written in base 10. %H A305378 Robert Israel, <a href="/A305378/b305378.txt">Table of n, a(n) for n = 0..10000</a> %p A305378 L[0]:= [0]: L[1]:= [1]: %p A305378 for d from 2 to 10 do %p A305378 L[d]:= map(t -> (2*t, `if`(t mod 4 <> 3, 2*t+1,NULL)), L[d-1]) %p A305378 od: %p A305378 A003726:=map(op,[seq(L[i],i=0..10)]): %p A305378 seq(A003726[i],i=2..nops(A003726),2); # _Robert Israel_, Jun 12 2018 %o A305378 (Python) %o A305378 def A305378(n): %o A305378 m, tlist, s = 2*n+1, [1,2,4], 0 %o A305378 while tlist[-1]+tlist[-2]+tlist[-3] <= m: %o A305378 tlist.append(tlist[-1]+tlist[-2]+tlist[-3]) %o A305378 for d in tlist[::-1]: %o A305378 s *= 2 %o A305378 if d <= m: %o A305378 s += 1 %o A305378 m -= d %o A305378 return s # _Chai Wah Wu_, Jun 12 2018 %Y A305378 Equals A003726(2n+1). %Y A305378 Cf. A278038. %K A305378 nonn,base %O A305378 0,2 %A A305378 _N. J. A. Sloane_, Jun 12 2018 %E A305378 More terms from _Robert Israel_, Jun 12 2018