OFFSET
0,3
FORMULA
n = a(n) if n is palindromic in base 16 (see A029730),
EXAMPLE
a(17) = 17 because 17 in hexadecimal is 11, the same as its reverse.
a(18) = 33 because 18 in hexadecimal is 12, and hexadecimal 21 is 2 * 16 + 1 = 33.
a(19) = 49 because 19 in hexadecimal is 13, and hexadecimal 31 is 3 * 16 + 1 = 49.
MATHEMATICA
Table[FromDigits[Reverse[IntegerDigits[n, 16]], 16], {n, 0, 127}] (* Alonso del Arte, Sep 30 2018 *)
PROG
(PARI) a(n) = fromdigits(Vecrev(digits(n, 16)), 16); \\ Michel Marcus, Sep 30 2018
(Scala) (0 to 127).map(n => java.lang.Integer.parseInt(java.lang.Integer.toHexString(n).reverse, 16)) // Alonso del Arte, Mar 23 2026
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Henry Bottomley, Jul 18 2000
STATUS
approved
