login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004489 Table of tersums m + n (answers written in base 10). 3
0, 1, 1, 2, 2, 2, 3, 0, 0, 3, 4, 4, 1, 4, 4, 5, 5, 5, 5, 5, 5, 6, 3, 3, 6, 3, 3, 6, 7, 7, 4, 7, 7, 4, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 6, 6, 0, 6, 6, 0, 6, 6, 9, 10, 10, 7, 1, 1, 7, 1, 1, 7, 10, 10, 11, 11, 11, 2, 2, 2, 2, 2, 2, 11, 11, 11, 12, 9, 9, 12, 0, 0, 3, 0, 0, 12, 9, 9, 12, 13, 13, 10, 13, 13, 1, 4, 4, 1, 13, 13, 10, 13, 13 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Alois P. Heinz, Antidiagonals d = 0..140, flattened

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.

MAPLE

T:= proc(n, m) local t, h, r, i;

      t, h, r:= n, m, 0;

      for i from 0 while t>0 or h>0 do

        r:= r +3^i *irem(irem(t, 3, 't') +irem(h, 3, 'h'), 3)

      od; r

    end:

seq(seq(T(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Sep 07 2011

MATHEMATICA

T[n_, m_] := Module[{t, h, r, i, remt, remh}, {t, h, r} = {n, m, 0}; For[i = 0, t>0 || h>0, i++, r = r + 3^i*Mod[({t, remt} = QuotientRemainder[t, 3 ]; remt) + ({h, remh} = QuotientRemainder[h, 3]; remh), 3]]; r]; Table[Table[T[n, d-n], {n, 0, d}], {d, 0, 13}] // Flatten (* Jean-Fran├žois Alcover, Jan 07 2014, translated from Maple *)

CROSSREFS

Similar to but different from A004481.

Cf. A003987 (analogous sequence for base 2).

Sequence in context: A305383 A004481 A307296 * A305384 A112599 A308119

Adjacent sequences:  A004486 A004487 A004488 * A004490 A004491 A004492

KEYWORD

nonn,base,tabl,look,easy,nice

AUTHOR

N. J. A. Sloane.

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Jan 23 2001

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 17 16:38 EDT 2019. Contains 325107 sequences. (Running on oeis4.)