A305378 Tribonacci representation of 2n+1, written in base 10.
1, 3, 5, 8, 10, 12, 16, 18, 20, 22, 25, 27, 33, 35, 37, 40, 42, 44, 48, 50, 52, 54, 65, 67, 69, 72, 74, 76, 80, 82, 84, 86, 89, 91, 97, 99, 101, 104, 106, 108, 128, 130, 132, 134, 137, 139, 141, 145, 147, 149, 152, 154, 160, 162, 164, 166, 169, 171, 173, 177, 179, 181, 192, 194, 196, 198, 201
Offset: 0
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Programs
-
Maple
L[0]:= [0]: L[1]:= [1]: for d from 2 to 10 do L[d]:= map(t -> (2*t, `if`(t mod 4 <> 3, 2*t+1,NULL)), L[d-1]) od: A003726:=map(op,[seq(L[i],i=0..10)]): seq(A003726[i],i=2..nops(A003726),2); # Robert Israel, Jun 12 2018
-
Python
def A305378(n): m, tlist, s = 2*n+1, [1,2,4], 0 while tlist[-1]+tlist[-2]+tlist[-3] <= m: tlist.append(tlist[-1]+tlist[-2]+tlist[-3]) for d in tlist[::-1]: s *= 2 if d <= m: s += 1 m -= d return s # Chai Wah Wu, Jun 12 2018
Extensions
More terms from Robert Israel, Jun 12 2018