login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004500 Tersum n + 11. 0
11, 9, 10, 14, 12, 13, 17, 15, 16, 20, 18, 19, 23, 21, 22, 26, 24, 25, 2, 0, 1, 5, 3, 4, 8, 6, 7, 38, 36, 37, 41, 39, 40, 44, 42, 43, 47, 45, 46, 50, 48, 49, 53, 51, 52, 29, 27, 28, 32, 30, 31, 35, 33, 34, 65, 63, 64, 68, 66, 67, 71, 69, 70, 74, 72, 73, 77, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Table of n, a(n) for n=0..67.

Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1,0,0,0,0,-1,1,0,1,-1,0,0,0,0,-1,1,0,1,-1).

FORMULA

Tersum m + n: write m and n in base 3 and add mod 3 with no carries, e.g. 5 + 8 = "21" + "22" = "10" = 1.

a(n) = A004489(n, 11). - Michel Marcus, Nov 09 2021

G.f.: (20*x^21+x^20-2*x^19-16*x^18-7*x^12+x^11-2*x^10+11*x^9-7*x^3+x^2-2*x+11) / ((x^2+x+1)*(x^18+x^9+1)*(x-1)^2). - Alois P. Heinz, Nov 09 2021

PROG

(Python)

def a(n):

    k, pow3, m = 0, 1, 11

    while n + m > 0:

        n, rn = divmod(n, 3)

        m, rm = divmod(m, 3)

        k, pow3 = k + pow3*((rn+rm)%3), pow3*3

    return k

print([a(n) for n in range(58)]) # Michael S. Branicky, Nov 09 2021

CROSSREFS

Cf. A004489.

Sequence in context: A299972 A334275 A090075 * A342162 A337227 A254716

Adjacent sequences:  A004497 A004498 A004499 * A004501 A004502 A004503

KEYWORD

nonn,base,easy

AUTHOR

N. J. A. Sloane.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 2 06:08 EDT 2022. Contains 357191 sequences. (Running on oeis4.)