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.

A187829 Numbers that when converted to hexadecimal and the letters are replaced by base 10 equivalents, result in the same number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 4494410, 4494411, 4494412, 4494413, 4494414, 4494415, 4715360, 4715361, 4715362, 4715363, 4715364, 4715365, 4715366, 4715367, 4715368, 4715369, 5660810, 5660811, 5660812, 5660813, 5660814, 5660815
Offset: 1

Views

Author

Ross Millikan, Dec 27 2012

Keywords

Examples

			4494410 in hex is 44944A.  Replacing A in the string results in 4494410.
		

Programs

  • Python
    def hexmatch(inp):
        h=hex(inp)
        ho=''
        for i in h[2:]:
            if i=='a': ho+='10'
            elif i=='b' :ho+='11'
            elif i=='c' :ho+='12'
            elif i=='d' :ho+='13'
            elif i=='e' :ho+='14'
            elif i=='f' :ho+='15'
            else: ho +=i
        return ho
    def loop(start, stop):
        rec=100000000
        for i in range(start, stop):
            val=int(hexmatch(i))
            diff=val-i
            if diff==0: print(i, end=', ')
    loop(1, 5660816)