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.

A133287 Decimal numbers that when converted to hexadecimal produce a number that uses the same digits as the original number.

This page as a plain text file.
%I A133287 #14 Oct 05 2019 04:04:04
%S A133287 0,1,2,3,4,5,6,7,8,9,53,371,913,4100,5141,5412,6182,8200,9241,75120,
%T A133287 75121,75122,75123,75124,75125,75126,75127,75128,75129,75621,86150,
%U A133287 91465,98711,99481
%N A133287 Decimal numbers that when converted to hexadecimal produce a number that uses the same digits as the original number.
%C A133287 There are 24 numbers in all, not including single-digit numbers, that produce their anagram when converted in hexadecimal.
%C A133287 The decimal and hexadecimal representations must have the same digits in the same proportions. For this reason a number like 1040 is not in the sequence: it is 410 in hexadecimal and thus lacks the second zero. - _Alonso del Arte_, Mar 04 2013
%e A133287 53 = 35_16; 371 = 173_16; 913 = 391_16; 4100 = 1004_16.
%t A133287 Select[Range[0, 10000], Sort[IntegerDigits[#, 10]] == Sort[IntegerDigits[#, 16]] &] (* _Alonso del Arte_, Mar 04 2013 *)
%o A133287 (C++) #include <stdio.h> #include <string.h> char area1[8], area2[8]; long unsigned l; char c1[16], c2[16]; void main() { unsigned register a, b; for (l = 10; l < 100000lu; ++l) { sprintf(area1, "%lu", l); sprintf(area2, "%lx", l); if (strlen(area1) != strlen(area2)) continue; memset(c1, 0, 16); memset(c2, 0, 16); for (a = 0; b = area1[a]; ++a) ++c1[b&0xf]; for (a = 0; b = area2[a]; ++a) { if (b >= 'A') b -= 7; ++c2[b&0xf]; } for (a = 0;;) { if (c1[a] != c2[a]) break; if (++a >= 16) printf("%s=%s(hex) ", area1, area2); } } }
%K A133287 base,easy,fini,nonn,full
%O A133287 1,3
%A A133287 _Daniel Mondot_, Dec 20 2007