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.

Showing 1-5 of 5 results.

A102489 Take the decimal representation of n and read it as if it were written in hexadecimal.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 112
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Comments

List of numbers in base-16 representation that can be written with decimal digits.
Early in the sequence there are blocks recurring as a(n) = a(n-10)+16, but this pattern starts to fail when we reach 160, 161, ... with hex-representations A0, A1, ... which cannot be written with decimal digits. - Rick L. Shepherd, Jun 08 2012
Binary Coded Decimal (BCD) codes, common in electronics, when interpreted as plain binary-coded integers. For example, number 39 is BCD coded in two nibbles as 0011 1001 which is the binary expansion of 57; hence, taking into account the offset, a(1+39) = 57. - Stanislav Sykora, Jun 09 2012
Integers that avoid letters in their hexadecimal expansion. - Eliora Ben-Gurion, Aug 28 2019

Examples

			10 in decimal is 16 in base 16, so a(10)=16.
		

Crossrefs

Cf. A090725 (the subsequence of primes).

Programs

  • Haskell
    import Data.Maybe (fromJust, mapMaybe)
    a102489 n = a102489_list !! (n-1)
    a102489_list = mapMaybe dhex [0..] where
       dhex 0                         = Just 0
       dhex x | d > 9 || y == Nothing = Nothing
              | otherwise             = Just $ 16 * fromJust y + d
              where (x', d) = divMod x 16; y = dhex x'
    -- Reinhard Zumkeller, Jul 06 2012
  • Maple
    o10:= n -> min(padic:-ordp(n,2),padic:-ordp(n,5)):
    d:= [0,seq((2*16^o10(n)+3)/5, n=1..1000)]:
    ListTools:-PartialSums(d); # Robert Israel, Aug 30 2015
  • Mathematica
    Table[FromDigits[IntegerDigits[n], 16], {n, 0, 70}] (* Ivan Neretin, Aug 12 2015 *)

Formula

a(n) - a(n-1) = (2*16^A122840(n) + 3)/5. - Robert Israel, Aug 30 2015

Extensions

Edited by N. J. A. Sloane, Feb 08 2014 (changed definition, moved old definition to comment, changed offset and b-file).

A102488 Numbers in base-12 representation that cannot be written with decimal digits.

Original entry on oeis.org

10, 11, 22, 23, 34, 35, 46, 47, 58, 59, 70, 71, 82, 83, 94, 95, 106, 107, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 154, 155, 166, 167, 178, 179, 190, 191, 202, 203, 214
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Examples

			143 = 11*12^1 + 11*12^0 = 'BB', therefore 143 is a term.
		

Crossrefs

Complement of A102487; A102490, A102492, A102494.

Programs

  • Haskell
    import Data.List (unfoldr)
    a102488 n = a102488_list !! (n-1)
    a102488_list = filter (any (> 9) . unfoldr (\x ->
       if x == 0 then Nothing else Just $ swap $ divMod x 12)) [1..]
    -- Reinhard Zumkeller, Apr 18 2011
  • Mathematica
    Select[Range[250],Max[IntegerDigits[#,12]]>9&] (* Harvey P. Dale, Oct 20 2020 *)

A102492 Numbers in base-20 representation that cannot be written with decimal digits.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 130, 131, 132, 133
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Examples

			112 = 5*20^1 + 12*20^0 = '5C', therefore 112 is a term.
		

Crossrefs

Complement of A102491; A102488, A102490, A102494.

Programs

  • Haskell
    import Data.List (unfoldr)
    a102492 n = a102492_list !! (n-1)
    a102492_list = filter (any (> 9) . unfoldr
       (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 20)) [0..]
    -- Reinhard Zumkeller, Jun 27 2013
  • Mathematica
    Select[Range[150],Max[IntegerDigits[#,20]]>9&] (* Harvey P. Dale, Mar 27 2021 *)

A102494 Numbers in base-60 representation that cannot be written with decimal digits.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 12 2005

Keywords

Examples

			200 = 3*60^1 + 20*60^0 = '3K', therefore 200 is a term.
		

References

  • Mohammad K. Azarian, Meftah al-hesab: A Summary, MJMS, Vol. 12, No. 2, Spring 2000, pp. 75-95. Mathematical Reviews, MR 1 764 526. Zentralblatt MATH, Zbl 1036.01002.
  • Mohammad K. Azarian, A Summary of Mathematical Works of Ghiyath ud-din Jamshid Kashani, Journal of Recreational Mathematics, Vol. 29(1), pp. 32-42, 1998.

Crossrefs

Complement of A102493; A102488, A102490, A102492.

Programs

  • Haskell
    import Data.List (unfoldr)
    a102494 n = a102494_list !! (n-1)
    a102494_list = filter (any (> 9) . unfoldr
       (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 60)) [0..]
    -- Reinhard Zumkeller, Jun 27 2013
  • Mathematica
    Select[Range[100],Max[IntegerDigits[#,60]]>9&] (* Harvey P. Dale, Dec 27 2012 *)

A262222 Decimal representations of hexadecimal numbers that can be misinterpreted as decimal numbers in scientific E notation.

Original entry on oeis.org

480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511
Offset: 1

Views

Author

Adam J.T. Partridge, Sep 16 2015

Keywords

Comments

Hexadecimal numbers containing no alpha digits other than a single "e", where the "e" is not the first or last digit (e.g., 3e12), may be misinterpreted as numbers in scientific E notation.
These numbers are especially troublesome when importing hexadecimal numbers from CSV files into Microsoft Excel.
These numbers can be written as 16^(i+1)a + 14*16^i + b where a and b are members of A102489 with a>0, b<16^i and i>0.
Numbers whose hexadecimal representation matches the regular expression [1-9][0-9]*e[0-9]+. - Eric M. Schmidt, Sep 28 2023

Examples

			480_10 = 1e0_16 and 1e0 = 1 in E notation.
739_10 = 2e3_16 and 2e3 = 2000_10 in E notation.
		

Crossrefs

A subset of A102490.

Programs

  • C
    #include 
    #define DIGIT_E 14
    bool isA262222(int k)
    {
        if (k <= 0 || k % 16 == DIGIT_E) return false;
        bool foundE = false;
        int digit;
        while (k > 0) {
            digit = k % 16;
            if (digit == DIGIT_E) {
                if (foundE) return false;
                foundE = true;
            }
            else if (digit > 9) return false;
            k /= 16;
        }
        return foundE && digit != DIGIT_E;
    } // Eric M. Schmidt, Sep 28 2023
  • Python
    from itertools import count,product
    # every string of d characters with exactly one 'e' in it, and all the other characters digits 0-9, in ascending lexicographic order
    def mids(d):
        if d<1:
            raise Exception("d<1")
        if d==1:
            yield 'e'
            return
        for i in range(0,10):
            for m in mids(d-1):
                yield str(i)+m
        for i in range(10**(d-1)):
            yield 'e'+str(i).zfill(d-1)
    def a_generator():
        for d in count(1):
            for start in range(1,10): # for each leading digit 1-9
                for mid in mids(d): # for all possible middles made of d characters, containing exactly one 'e'
                    for end in range(10): #for each possible final digit, 0-9
                        s = '{}{}{}'.format(start,''.join(mid),end)
                        i = int(s,16)
                        yield i
    a262222 = a_generator()
    [next(a262222) for  in range(48)] # _Christian Perfect, Oct 20 2015
    
Showing 1-5 of 5 results.