OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10001
MAPLE
L[0]:= [0]: L[1]:= [1]:
for d from 2 to 15 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..15)]):
PROG
(Python)
from sympy import prime
def A305377(n):
m, tlist, s = prime(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
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 12 2018
EXTENSIONS
More terms from Robert Israel, Jun 12 2018
STATUS
approved