login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A305380
Tribonacci representation of 2^n, written in base 10.
2
1, 2, 4, 9, 19, 41, 88, 195, 418, 1033, 2195, 4705, 10282, 21850, 49160, 104465, 223780, 550294, 1186344, 2525345, 5514438, 11817057, 26297040, 56201282, 138856076, 295217708, 632609378, 1382640428, 2974062096, 6603081730, 14149570820, 34976354857, 74361996963
OFFSET
0,2
LINKS
MAPLE
T:= proc(n) T(n):= (<<0|1|0>, <0|0|1>, <1|1|1>>^n)[2, 3] end:
b:= proc(n) option remember; local j;
if n=0 then 0
else for j from 2 while T(j+1)<=n do od;
b(n-T(j))+2^(j-2)
fi
end:
a:= n-> b(2^n):
seq(a(n), n=0..35); # Alois P. Heinz, Jun 12 2018
PROG
(Python)
def A305380(n):
m, tlist, s = 2**n, [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
CROSSREFS
Equals A003726(2^n).
Sequence in context: A141683 A142474 A078039 * A275862 A036622 A001384
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 12 2018
EXTENSIONS
a(9)-a(24) from Robert Israel, Jun 12 2018
Terms a(25) and beyond from Alois P. Heinz, Jun 12 2018
STATUS
approved