OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
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)]):
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 12 2018
EXTENSIONS
More terms from Robert Israel, Jun 12 2018
STATUS
approved