login
A174574
Partial sums of A065363.
2
0, 1, 1, 2, 4, 3, 3, 4, 4, 5, 7, 8, 10, 13, 11, 10, 10, 9, 9, 10, 10, 11, 13, 12, 12, 13, 13, 14, 16, 17, 19, 22, 22, 23, 25, 26, 28, 31, 33, 36, 40, 37, 35, 34, 32, 31, 31, 30, 30, 31, 29, 28, 28, 27, 27, 28, 28, 29, 31, 30, 30, 31, 31, 32, 34, 35, 37, 40, 38, 37, 37, 36, 36, 37
OFFSET
0,4
LINKS
FORMULA
a(0) = 0, a(n) = a(n-1) + A065363(n), n >= 1.
a(n) <= n with equality iff n belongs to A003462. - Rémy Sigrist, Oct 05 2019
PROG
(Python)
def a065363(n):
s=0
x=0
while n>0:
x=n%3
n//=3
if x==2:
x=-1
n+=1
s+=x
return s
l=[0]
for n in range(1, 101): l.append(l[n - 1] + a065363(n))
print(l) # Indranil Ghosh, Jun 07 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Daniel Forgues, Mar 23 2010
STATUS
approved