cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A174574 Partial sums of A065363.

Original entry on oeis.org

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

Views

Author

Daniel Forgues, Mar 23 2010

Keywords

Crossrefs

Programs

  • 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

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