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.

A055947 n - reversal of base 3 digits of n (written in base 10).

Original entry on oeis.org

0, 0, 0, 2, 0, -2, 4, 2, 0, 8, 0, -8, 8, 0, -8, 8, 0, -8, 16, 8, 0, 16, 8, 0, 16, 8, 0, 26, 0, -26, 20, -6, -32, 14, -12, -38, 32, 6, -20, 26, 0, -26, 20, -6, -32, 38, 12, -14, 32, 6, -20, 26, 0, -26, 52, 26, 0, 46, 20, -6, 40, 14, -12, 58, 32, 6, 52, 26, 0, 46, 20, -6, 64, 38, 12, 58, 32, 6, 52, 26, 0, 80, 0, -80, 56, -24, -104, 32, -48
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

a(n) is even.

Examples

			For n = 5, the reversal of base 3 digits of n (written in base 10) is 7. So, a(5) = 5 - 7 = -2. - _Indranil Ghosh_, Feb 01 2017
		

Crossrefs

Programs

  • Mathematica
    Table[n-FromDigits[Reverse[IntegerDigits[n,3]],3],{n,0,90}] (* Harvey P. Dale, May 14 2022 *)
  • PARI
    a(n) = n - fromdigits(Vecrev(digits(n, 3)), 3); \\ Michel Marcus, Aug 09 2019

Formula

a(n) = n - A030102(n).