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.

A217557 The difference between the reversal of an 8-bit integer and the original integer.

Original entry on oeis.org

0, 127, 62, 189, 28, 155, 90, 217, 8, 135, 70, 197, 36, 163, 98, 225, -8, 119, 54, 181, 20, 147, 82, 209, 0, 127, 62, 189, 28, 155, 90, 217, -28, 99, 34, 161, 0, 127, 62, 189, -20, 107, 42, 169, 8, 135, 70, 197, -36, 91, 26, 153, -8, 119, 54, 181, -28, 99
Offset: 0

Views

Author

Jon Perry, Oct 06 2012

Keywords

Comments

The difference between the reversal of an 8-bit integer and the original integer.

Examples

			5 -> 00000101 -> 10100000 = 160 so a(5) = 155.
		

Crossrefs

Cf. A160638.

Programs

  • Mathematica
    Table[FromDigits[Reverse[PadLeft[IntegerDigits[n,2],8,0]],2]-n,{n,0,60}] (* Harvey P. Dale, Oct 12 2012 *)
  • PARI
    A217557(n)=sum(i=0,7,bittest(n,7-i)<M. F. Hasler, Oct 07 2012

Formula

a(n) = A160638(n) - n.