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.

A073796 Replace 9^k with (-9)^k in base 9 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, -9, -8, -7, -6, -5, -4, -3, -2, -1, -18, -17, -16, -15, -14, -13, -12, -11, -10, -27, -26, -25, -24, -23, -22, -21, -20, -19, -36, -35, -34, -33, -32, -31, -30, -29, -28, -45, -44, -43, -42, -41, -40, -39, -38, -37, -54, -53, -52, -51, -50, -49, -48, -47, -46
Offset: 0

Views

Author

Robert G. Wilson v, Aug 12 2002

Keywords

Comments

Base 9 representation for n (in lexicographic order) converted from base -9 to base 10.

Crossrefs

Programs

  • Mathematica
    f[n_Integer, b_Integer] := Block[{l = IntegerDigits[n]}, Sum[l[[ -i]]*(-b)^(i - 1), {i, 1, Length[l]}]]; a = Table[ FromDigits[ IntegerDigits[n, 9]], {n, 0, 80}]; b = {}; Do[b = Append[b, f[a[[n]], 9]], {n, 1, 80}]; b

Formula

a(9*k+m) = -9*a(k)+m for 0 <= m < 9. - Chai Wah Wu, Jan 16 2020