%I #18 Mar 24 2026 00:15:44
%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,17,33,49,65,81,97,113,129,
%T 145,161,177,193,209,225,241,2,18,34,50,66,82,98,114,130,146,162,178,
%U 194,210,226,242,3,19,35,51,67,83,99,115,131,147,163,179,195,211,227,243,4
%N Base 16 reversal of n (written in base 10).
%F n = a(n) if n is palindromic in base 16 (see A029730),
%e a(17) = 17 because 17 in hexadecimal is 11, the same as its reverse.
%e a(18) = 33 because 18 in hexadecimal is 12, and hexadecimal 21 is 2 * 16 + 1 = 33.
%e a(19) = 49 because 19 in hexadecimal is 13, and hexadecimal 31 is 3 * 16 + 1 = 49.
%t Table[FromDigits[Reverse[IntegerDigits[n, 16]], 16], {n, 0, 127}] (* _Alonso del Arte_, Sep 30 2018 *)
%o (PARI) a(n) = fromdigits(Vecrev(digits(n, 16)), 16); \\ _Michel Marcus_, Sep 30 2018
%o (Scala) (0 to 127).map(n => java.lang.Integer.parseInt(java.lang.Integer.toHexString(n).reverse, 16)) // _Alonso del Arte_, Mar 23 2026
%Y Cf. A004086 (base 10 reversal), A030101-A030108 (base 2 to base 9 reversals of n), A056960 (base 11 reversal), A056961 (base 12 reversal), A056963 (base 20 reversal).
%Y Cf. A029730, base 16 palindromes.
%K base,nonn,easy
%O 0,3
%A _Henry Bottomley_, Jul 18 2000