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.

A286632 Base-3 digit sum of A254103: a(n) = A053735(A254103(n)).

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 2, 4, 1, 3, 3, 5, 3, 5, 2, 5, 4, 6, 3, 4, 2, 4, 2, 6, 2, 4, 3, 6, 1, 3, 4, 6, 3, 5, 4, 7, 4, 6, 4, 5, 5, 7, 2, 5, 3, 5, 3, 7, 5, 7, 3, 5, 4, 6, 3, 7, 6, 8, 4, 4, 3, 5, 5, 7, 6, 8, 4, 6, 3, 5, 6, 8, 3, 5, 5, 7, 5, 7, 3, 6, 4, 6, 5, 8, 1, 3, 5, 6, 2, 4, 4, 6, 2, 4, 2, 8, 4, 6, 6, 8, 2, 4, 2, 6, 3, 5, 4, 7, 4, 6, 5, 8, 5, 7, 5, 9, 5, 7, 4, 5
Offset: 0

Views

Author

Antti Karttunen, Jun 03 2017

Keywords

Comments

Reflecting the structure of A254103 also this sequence can be represented as a binary tree:
0
|
...................1...................
2 1
3......../ \........2 4......../ \........2
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
4 1 3 3 5 3 5 2
5 4 6 3 4 2 4 2 6 2 4 3 6 1 3 4
etc.

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a254103(n):
        if n==0: return 0
        if n%2==0: return 3*a254103(n/2) - 1
        else: return floor((3*(1 + a254103((n - 1)/2)))/2)
    def a(n): return sum(digits(a254103(n), 3)[1:]) # Indranil Ghosh, Jun 06 2017
  • Scheme
    (define (A286632 n) (A053735 (A254103 n)))
    

Formula

a(n) = A053735(A254103(n)).
a(n) = A056239(A286633(n)).
For all n >= 0, a(A000079(n)) = n+1.